Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Hi Sajid,
If you have the canvasjs waterfall chart then you need to connect data from dataStore of KoolReport to the dataPoints of Waterfall. Here are few step:
<?php
$dataPoints = array();
foreach($this->dataStore("yourstore") as $item)
{
array_push($dataPoints,array(
"label"=>$item["your-category-column-name"],
"value"=>$item["your-value-column-name"]
));
}
?>
Now you have the the PHP array $dataPoints, In order to convert it into dataPoint of canvasjs, you will use the json_encode() function:
3 Create your waterfall like you normally do, and at the dataPoints settings, you do:
var chart = new CanvasJS.Chart("chartContainer", {
...
data:{
dataPoints:<?php echo json_encode($dataPoints); ?>
}
...
}
All done! Hope that helps.
I would like to share our new D3 package with Waterfall chart.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo