iluxaar/yii2-highcharts

Yii2 Highcharts

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2016-10-30 16:09 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:08:59 UTC


README

Yii2 Highcharts

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"iluxaar/yii2-highcharts": "*"

to the require section of your composer.json file.

Usage

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

<?=
\iluxaar\highcharts\HighChart::widget([
    'clientOptions' => [
        'chart' => [
            'type' => 'column',
        ],
        'title' => [
            'text' => 'Monthly Average Rainfall',
        ],
        'subtitle' => [
            'text' => 'Source: WorldClimate.com',
        ],
        'yAxis' => [
            'title' => [
                'text' => 'Rainfall (mm)',
            ],
        ],
        'xAxis' => [
            'categories' => ['Jan', 'Feb', 'Mar'],
        ],
        'series' => [
            ['name' => 'Tokyo', 'data' => [49.9, 71.5, 106.4]],
            ['name' => 'New York', 'data' => [83.6, 78.8, 98.5]],
            ['name' => 'London', 'data' => [48.9, 38.8, 39.3]],
        ],
    ],
]);
?>