I am trying to show some data on the chart while using Yii2
. I have installed Yii2 Chart JS via the composer. Below is the code is taken from the documentation
use practicallychartjsChart;
Chart::widget([
'type' => Chart::TYPE_BAR,
'datasets' => [
[
'data' => [
'Label 1' => 10,
'Label 2' => 20,
'Label 3' => 30
]
]
]
]);
Now when I refreshed this page I not seeing any chart. But in inspect->console
I am getting an error
Uncaught ReferenceError: Chart is not defined
Update 1
Here is my composer.lock file
I have looked into this issue and found some solutions but still unable to perform the task.
Any help would be highly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…