|
How to |
Posted by Golf on Jan-23-2012 14:02 |
|
Hi Peter,
I have one question about how to create graph(pie graph).
When I put all data in data variable($data = $temp_val_final), The graph would
automatically generate each sectors. Nevertheless, I want to generate it by myself.
Thank you for your help.
Ps.I attached picture file for example.
Regards
Golf
|
Re: How to |
Posted by Peter Kwan on Jan-24-2012 01:39 |
|
Hi Golf,
You can use the size of the sectors as the data. For the position of the first sector and the direction, you may use PieChart.setStartAngle to control. For example, in your case, you may use (in PHP):
$labels = array("A", "B", "C");
$data = array(50, 25, 25);
....
$c->setData($labels, $data);
#Start at angle=180, anti-clockwise
$c->setStartAngle(180, false);
Hope this can help.
Regards
Peter Kwan |
|