An extention that helps create beautifull charts using ChartJS, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist ctala/yii2-ctala-chartjs "*"
or add, (*4)
"ctala/yii2-ctala-chartjs": "*"
to the require section of your composer.json
file., (*5)
Usage
Once the extension is installed, simply use it in your code by :, (*6)
php
echo \ctala\chartjs\ChartJS::widget([
"data" => $datosAno2016,
"responsive" => "false",
"titulo" => "Ventas Sitios 2016",
"id" => "canvas2016",
"height" => 500,
"width" => 1000,
]
);
echo \ctala\chartjs\ChartJS::widget([
"data" => $datosAno2015,
"responsive" => "false",
"titulo" => "Ventas Sitios 2015",
"id" => "canvas2015",
"height" => 500,
"width" => 1000,
"chartType" => "line"
]
);
?>
, (*7)