I am trying to get the count of data in my barchart, but the datastore's count method always returns 0.
<?php
use \koolreport\widgets\google\BarChart;
$dataStore = $report->dataStore('reportGraphData');
?>
<div class="bar-chart">
<?php
BarChart::create(array(
'title' => $dataStore->count() == 15 ? 'Top 15 results' : '',
"width"=>'100%',
"height"=>'600px',
"dataSource"=>$dataStore,
"options" => [
'legend' => 'none',
"colors" => ['#4C9850'],
"backgroundColor" => 'transparent',
],
));
?>
</div>
This is my code. The count is working for other charts but not for the bar chart here. Any other way to get the count of data?
Thanks