Sunday, June 9, 2013

Yii Highchart Create pie chart

Heres a code on how to create Pie Chart in Yii HighChart







Widget('ext.highcharts.HighchartsWidget', array(
'options'=>array(
'title' => array('text' => 'Population By Year'),
'chart' => array('renderTo' =>'charts'),
'credits' => array('enabled' => false),
'series' => array(
array(
'type'=>'pie',
'name'=>'Browser Awesome',
'data'=>array(
array('Firefox',45.0),
array('Internet Explorer',50.0),
array('Internet Explorer',250.0),
array('Internet Explorer',300.0),
),
),
),
),
));

?>

No comments:

Post a Comment