dominus77 / yii2-highcharts-widget
Renders a Highcharts widget for Yii2.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/highcharts: ^8.0
- yiisoft/yii2: ~2.0
Requires (Dev)
- phpunit/phpunit: 6.*
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2024-12-13 00:41:26 UTC
README
Highcharts widget for Yii2
Installation
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.
Usage
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]] ] ] ]) ?>
More Information
Please, check the Highcharts Documentation
Testing
$ vendor/bin/phpunit
License
The MIT License (MIT). Please see License File for more information.