|
Transparent Segment of Donut Chart |
Posted by craig lutz on Dec-06-2011 06:40 |
|
I was wondering if there was a way to have 1 of my colors in my donut chart be
transparent? Essentially, I want just a semi-circle of the Donut Chart to be invisible (only
see the background color in that spot)?
Thanks in advance |
Re: Transparent Segment of Donut Chart |
Posted by Peter Kwan on Dec-07-2011 00:32 |
|
Hi Craig,
Yes. You can just set the sector color to Transparent.
For example, in the "2D Donut Shading" sample code (donutshading.php), you can set the colors array to be:
colors = Array(Transparent, &Heebb22, &Hbbbbbb, &H8844ff)
In this way, the first segment will be transparent.
If you are not using a color array (that means the colors are automatically determined by ChartDirector), you may use (in PHP 5):
#Set the first sector the transparent
$c->sector(0)->setColor(Transparent);
I have found that the Transparent method works for all donut shading methods, except for RoundedEdgeShading. For RoundedEdgeShading, even if the sector is transparent, you can still see the white glare, so the segment is not completely invisible.
Hope this can help.
Regards
Peter Kwan |
Re: Transparent Segment of Donut Chart |
Posted by Thair on Dec-14-2011 12:11 |
|
Hi,
this is very informative for all of us, Thanks for Reply to this message,
Thair, |
|