0👍
To display chart you must echo
result of widget
echo Chart::widget([
'type' => Chart::TYPE_BAR,
'datasets' => [
[
'data' => [
'Label 1' => 10,
'Label 2' => 20,
'Label 3' => 30
]
]
]
]);
- Chartjs-I want to use an object to help create a chart with Chartjs
- Chartjs-ChartJS – Issues with positioning and viewing various components of horizontal bar
Source:stackexchange.com