Chart widget (version >= 6.0.0)
Using an Excel's Chart widget for displaying a chart with several properties. This widget only works in Excel template and not in spreadsheet template.
dataSource #
Either a datastore name or a datastore to act as a chart's data
excelDataSource #
An excel table name to act as a chart's data
title #
A string to be set as a chart's title
xAxisTitle #
A string to be set as a chart's X axis title
yAxisTitle #
A string to be set as a chart's Y axis title
stacked #
A boolean indicating whether a chart's bars, columns should be stacked or not. Default value is false
direction #
An enum string ('horizontal' or 'vertical') indicating a chart's X, Y axes. Default value is 'vertical'
<div>
<div>
<?php
\koolreport\excel\Table::create(array(
"name" => "TableOrders",
"dataSource" => 'Orders',
));
</div>
<div range="A2:H2">
<?php
\koolreport\excel\LineChart::create([
"dataSource" => $this->dataStore('Orders'),
"dataSource" => "Orders",
"excelDataSource" => "TableOrders",
'title' => 'Sales Orders',
'xAxisTitle' => 'Orders List',
'yAxisTitle' => 'Sales($)',
'stacked' => true, //default: true
'direction' => 'horizontal', //default: 'vertical'
]);
?>
</div>
</div>
Get started with KoolReport
KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.