DonutChart

Overview #

A donut chart that is rendered within the browser using SVG or VML. Displays tooltips when hovering over slices.

Example #

<?php
DonutChart::create(array(
    "title"=>"Sale Of Category",
    "dataSource"=>$this->dataStore('sale_of_category'),
    "columns"=>array(
        "category",
        "cost"=>array(
            "type"=>"number",
            "prefix"=>"$",
        )
    )
));
?>

Explode Slices #

You can separate donut slices from the rest of the chart with the offset property of the slices option:

<?php
DonutChart::create(array(
    ...
    "options"=>array(
        "slices"=>array(
            "3"=>array("offset"=>0.2)
        )
    ),
));
?>

Remove Slices #

To omit a slice, change the color to 'transparent':

<?php
DonutChart::create(array(
    ...
    "options"=>array(
        "slices"=>array(
            "3"=>array("color"=>"transparent")
        )
    ),
));
?>

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.