PHP code example of khotim / yii2-highcharts

1. Go to this page and download the library: Download khotim/yii2-highcharts library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

khotim / yii2-highcharts example snippets


<?= \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]
            ]
        ]
    ]
]) 

php composer.phar