In Codeigniter view file dataStore undefined error showing up
Controller
public function get_payment_type_by_date($type = NULL)
{
$report = new Payment(array(
"dbname" => $this->dbname,
"from"=>$this->input->post('from'),
"to"=>$this->input->post('to'),
'base_url' => base_url()
));
$report->run();
$data = array(
'report'=> $report
);
$this->load->view('index', $data);
}
view
<?php
google\PieChart::create(array(
"dataStore"=> $this->dataStore('payment'),
"columns"=>array("type",
"amount"=>array("prefix"=>"$")),
"options"=>array(
'title' => 'Payment By Type',
'pieSliceText'=>'value'
),
"width"=>'100%',
// 'height'=>'300px',
"clientEvents"=>[
"rowSelect"=>"function(params){
window.location='<?php echo base_url(); ?>/reports/'+params.selectedRow[0];
}"
]
));
?>
ERROR
An uncaught Exception was encountered Type: Error
Message: Call to undefined method CI_Loader::dataStore()