ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How to set sector to transparent with Sector.setColor and Sector.setLabelStyle in PHP?
Posted by Vincent Chang on Jun-16-2018 04:53
Hi,

How are you doing? I am trying to find out the usage of Sector.setColor and Sector.setLabelStyle in PHP.

For example if I have a donut pie with 9 sectors, how do I set the 7th sector with transparent color and label? My goal is to show the result as though the 7th sector is not there in visual.

Thanks

Vincent

  Re: How to set sector to transparent with Sector.setColor and Sector.setLabelStyle in PHP?
Posted by Peter Kwan on Jun-18-2018 02:50
Hi Vincent,

You can do something like:

#Make sure you set the data first to let ChartDirector know the sector count
$c->setData(.....);

#Set the 7th sector (the first sector is 0) and its label to transparent
$c->sector(6)->setColor(Transparent, Transparent, Transparent);
$c->sector(6)->setLabelStyle("", 8, Transparent);

Hope this can help.

Regards
Peter Kwan

  Re: How to set sector to transparent with Sector.setColor and Sector.setLabelStyle in PHP?
Posted by Vincent Chang on Jun-19-2018 05:04
Hi Peter,

Thank you for the answer.

Vincent