Install highcharts extenion in yii2 manualy [without composer]

1.5k views Asked by At

Step 1:Downloaded highcharts extension and extract it in /vendor/miloschuman/highcharts Step 2: added following code in extension.php

    'miloschuman/highcharts' => array (
    'name' => 'miloschuman/highcharts',
    `enter code here`   'version' => '4',
    'alias' => array (
        '@miloschuman/highcharts' => $vendorDir . 'miloschuman/highcharts',
    ),
   ),

step3: added code in autoload_psr4.php

'miloschuman\\highcharts\\' => array($vendorDir . '/miloschuman/highcharts'),

Step 4 :in view

use miloschuman\highcharts\Highcharts;

but getting error

Class 'miloschuman\highcharts\Highcharts' not found

2

There are 2 answers

5
Ankush Rishi On

Please visit https://github.com/miloschuman/yii2-highcharts
It worked fine for me. Hope this work fine for you also.
You can download the ZIP file and follow the process accordingly as given in the link.

0
AlbertoRamirez On

You are missing /src when editing autoload_psr4.php

'miloschuman\highcharts\' => array($vendorDir . '/miloschuman/highcharts/src'),