How do I get data from a specific column in GridView in Yii2 and it will be shown into the Google Chart
I used this GoogleChart Yii library: https://github.com/ScottHuangZL/yii2-google-chart
I was able to show a sample data:
<div class="col-sm-5">
<?php
use scotthuangzl\googlechart\GoogleChart;
echo GoogleChart::widget(array('visualization' => 'PieChart',
'data' => array(
array('Task', 'Hours per Day'),
array('Work', 11),
array('Eat', 2),
array('Commute', 2),
array('Watch TV', 2),
array('Sleep', 7)
),
'options' => array('title' => 'My Daily Activity')));