|
How to set foreground colors in XYChart? |
Posted by Tom on Mar-08-2012 23:51 |
|
Sorry if this is no-brainer but I am new with ChartDirector and can't find any way to set foreground color of XYChart although I can easily set background color. Could you give me any clue? |
Re: How to set foreground colors in XYChart? |
Posted by Peter Kwan on Mar-09-2012 02:13 |
|
Hi Tom,
A chart is not just a simple shape, but contains a lot of objects (like chart title, axis titles, axis labels, grid lines, bars, line segments, .....). So there is not a single "foreground color". Instead, you may specify the color of each of these objects.
For example, consider the sample code "Multi-Color Bar Chart". The sample code includes code to specify the color of each of the bars.
If you need further help, would you mind to inform me the exact "foreground color" you would like to configure?
Regards
Peter Kwan |
Re: How to set foreground colors in XYChart? |
Posted by Tom on Mar-09-2012 21:55 |
|
Thanks for your reply. I found setColor. Yeah I now understand I have to use it for several times to set "foreground" color. I just needed all white on black background and following statements worked.
XYChart *c = new XYChart(rect.Width(), rect.Height(),0x000000);
c->setColor(0xffff0001,0xffffff);
c->setColor(0xffff0002,0xffffff);
c->setColor(0xffff0007,0xffffff);
c->setColor(0xffff0008,0xffffff); |
|