maddoger/yii2-highcharts jQuery Highcharts extension for the Yii 2 framework

jquerycharthighcharts

Yii2 Highcharts Wrapper

Highcharts widget is a wrapper of Highcharts for Yii2 Framework.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist maddoger/yii2-highcharts "*"

or add

"maddoger/yii2-highcharts": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by:

use maddoger\widgets\Highcharts;

echo Highcharts::widget([
        'chartVariable' => 'cpuChart',
        'options' => [
            'style' => 'width: 100%; height: 400px;',
        ],
        'clientOptions' => [
            'chart' => [
                'type' => 'line',
            ],
            'title' => [
                'text' => 'CPU Usage',
            ],
            'xAxis' => [
                'type' => 'datetime',
                'tickPixelInterval' => 150,
                'maxZoom' => 20 * 2000,
            ],
            'yAxis' => [
                'min' => 0,
                'max' => 100,
                'title' => [
                    'text' => '%',
                ],
            ],
            'series' => [
                [
                    'name'=> 'Core 1',
                    'data'=> [],
                ],
                [
                    'name'=> 'Core 2',
                    'data'=> [],
                ],
            ],
        ],
    ]);

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



v1.0.2 is the latest of 3 releases



Apache License license
Stats
0 github stars & 0 github forks
0 downloads in the last day
2 downloads in the last 30 days
182 total downloads