KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

GoogleChart: animation on load #126

Open bysystem opened this topic on on Oct 5, 2017 - 2 comments

bysystem commented on Oct 5, 2017

Dear support team,

according to the GoogleChart documentation (https://developers.google.com/chart/interactive/docs/animation) it is possible to start a barchart or piechart with an animation during loading!

How can I do this in koolreport?

Kind regards

KoolReport commented on Oct 6, 2017

Hi,

It is possible. For example in the Sale By Customer example, you can animate the BarChart by setting like below

<?php
  BarChart::create(array(
        "dataStore"=>$this->dataStore('sales_by_customer'),
        "width"=>"100%",
        "height"=>"500px",
        "columns"=>array(
            "customerName"=>array(
                "label"=>"Customer"
            ),
      "dollar_sales"=>array(
                "type"=>"number",
                "label"=>"Amount",
                "prefix"=>"$",
                "emphasis"=>true
            )
        ),
        "options"=>array(
            "title"=>"Sales By Customer",
            "animation"=>array(
                "startup"=> true,
                "duration"=> 1000,
                "easing"=> 'out',
            ),
        )
    ));
?>
bysystem commented on Oct 6, 2017

Thx a lot, great!

Works like a charme!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

None