PHP code example of hscstudio / yii2-chart

1. Go to this page and download the library: Download hscstudio/yii2-chart 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/ */

    

hscstudio / yii2-chart example snippets


<?= \hscstudio\chart\Chart::widget(); 


use hscstudio\chart\ChartNew;
echo ChartNew::widget([
  'type'=>'bar', # pie, doughnut, line, bar, horizontalBar, radar, polar, stackedBar, polarArea
  'title'=>'PHP Framework',
  'labels'=>['Yii','Laravel','CI','Symfony'],
  'datasets' => [
	  ['title'=>'2014','data'=>[35,45,15,5]],
	  ['title'=>'2015','data'=>[45,35,5,15]],
  ],
]);

php composer.phar