i'll send you the view code :
<?php
use \koolreport\excel\Table;
use \koolreport\excel\PivotTable;
use \koolreport\excel\BarChart;
use \koolreport\excel\LineChart;
$sheet1 = "Sales by Customer";
?>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="Excel,HTML,CSS,XML,JavaScript">
<meta name="creator" content="John Doe">
<meta name="subject" content="subject1">
<meta name="title" content="title1">
<meta name="category" content="category1">
<div sheet-name="<?php echo $sheet1; ?>">
<div>
<div>
<?php
$chart = ['chart1' => [
'nom'=>'chart1',
'type' => ['bar'],
'colonnes'=>['departement', 'montant'],
'dataSource'=>'assuranceDS'
]];
Table::create(array(
"dataSource" => $this->dataStore('assuranceDS'),
// "dataSource" => 'orders',
// "filtering" => ['age','between',45,65],
));
?>
</div>
<div range="A25:H45">
<?php
BarChart::create([
'dataSource' => $this->dataStore('assuranceDS'), //table_0, table_1
'title' => $chart['chart1']['nom'],
'xAxisTitle' => 'Montant',
'yAxisTitle' => 'departement',
'column' => $chart['chart1']['colonnes']
])
?>
</div>
</div>
</div>