KoolReport's Forum

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

Combo chart #299

Open mohammed opened this topic on on May 29, 2018 - 3 comments

mohammed commented on May 29, 2018

I want to draw combo chart (that have mix (combination) between columns and line chart )

KoolReport commented on May 29, 2018

Here is the example:

ComboChart::create(array(
    "columns"=>array(
        "category",
        "dataBar",
        "dataLine"
    ),
    "options"=>array(
        "series"=>array(
            array("type"=>"bars"),
            array("type"=>"line"),
        )
    )
));
mohammed commented on Jul 30, 2018

this is not enough example.. i want a complete one because it does not working

KoolReport commented on Jul 30, 2018

Above code show you the most important code to setup a combochart, however you will need data which is required for any charts, for example

<?php
ComboChart::create(array(
    "dataSource"=>array(
        array("category","dataBar","dataLine"),
        array("Pencil",50,100),
        array("Paper",30,50),
        array("Book",120,30),
    ),
    "columns"=>array(
        "category",
        "dataBar",
        "dataLine"
    ),
    "options"=>array(
        "series"=>array(
            array("type"=>"bars"),
            array("type"=>"line"),
        )
    )
));
?>

For the purpose of demonstrating ComboBox, I use the array as datasource.

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
help needed

None