PieChart

Overview #

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

Example #

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

3D Pie Chart #

If you set the is3D option to true, your pie chart will be drawn as though it has three dimensions:

<?php
PieChart::create(array(
    ...
    "options"=>array(
        "is3D"=>true
    )
));
?>

Explode Slices #

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

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

Remove Slices #

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

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