Highcharts widget for Yii2
The preferred way to install this extension is through composer.
Either run
php composer.phar require dominus77/yii2-highcharts-widget
or add
"dominus77/yii2-highcharts-widget": "^1.0"
to the require section of your composer.json
file.
View:
<?php
use dominus77\highcharts\HighChartsWidget;
?>
<?= HighChartsWidget::widget([
'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' => 'John', 'data' => [5, 7, 3]]
]
]
]) ?>
Please, check the Highcharts Documentation
$ vendor/bin/phpunit
The MIT License (MIT). Please see License File for more information.