khotim / yii2-highcharts
Highcharts extension for the Yii framework
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-12-19 01:26:55 UTC
README
Yii2 wrapper for Highcharts library. It supports rendering Highcharts, Highstock, and Highmaps.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist khotim/yii2-highcharts "*"
or add
"khotim/yii2-highcharts": "*"
to the require section of your composer.json
file.
Usage
Insert the following code into a view file (using this sample).
<?= \khotim\highcharts\Highcharts::widget([ 'chartType' => \khotim\highcharts\Highcharts::TYPE_HIGHCHARTS, 'options' => [ 'id' => 'myChart' ], 'clientOptions' => [ 'chart' => [ 'type' => 'bar' ], 'title' => [ 'text' => 'Fruit Consumption' ], 'xAxis' => [ 'categories' => ['Apples', 'Bananas', 'Oranges'] ], 'yAxis' => [ 'title' => [ 'text' => 'Fruit eaten' ] ], 'series' => [ [ 'name' => 'Jane', 'data' => [1, 0, 4] ], [ 'name' =>'Production', 'data' => [5, 7, 3] ] ] ] ]) ?>