noobkoder
(Smurfdusk)
1
Hello I’m trying to make use of the Google Chart in Yii2, I’ve use a widget that I found on the Yii wiki.
I’ve followed all the instruction and it seems like I didn’t do anything wrong and I’m getting an error.
<?php
use yii\helpers\Html;
use scotthuangzl\googlechart\GoogleChart;
/* @var $this yii\web\View */
echo GoogleChart::widget(array('visualization' => 'PieChart',
'data' => array(
array('Task', 'Hours per Day'),
array('Work', '11'),
array('Sleep', '24'),
array('Commute', '1.5')
),
)
)
?>
<h1>Reporting Charts</h1>
<p>
Currently On Maintenance
</p>
Am I missing something? Pardon my ignorance.
Edit:
By the way, I’ve already done the composer update and stuff.
jkofsky
(Jkofsky)
2
Do you actually have scotthuangzl\googlechart\GoogleChart in the vendor directory?
noobkoder
(Smurfdusk)
3
Of course.
That’s why I’ve already done the composer update.
EDIT:
I have fixed it, what I’ve done was I deleted the folder of the widget and did a composer update then I installed it again.
jkofsky
(Jkofsky)
4
I wasn’t being flippant. Just asking in case composer didn’t work. Which it looks like it didn’t 