Hi anbu,
Would you mind to clarify which color you would like to find, and how would you like to look up the color?
For all of the charts in ChartDirector, you code can specify the color of everything. For example, to plot a bar chart, your code can specify the color of the bars. In this case, to obtain the color of a bar, you may look up your code to see what colors it is using.
If you let ChartDirector to automatically color the bars, then the Nth auto-color is:
myColor = cd.defaultPalette(7 + N)
See "Color Specification" (you may look up "Color Specification" from the ChartDirector documentation index) for details.
If you would like to know the color of a pixel after drawing the chart (after calling makeChart or makePicture or makeSession), you may use:
color = c.getDrawArea().getPixel(xPixelCoor, yPixelCoor)
Hope this can help.
Regards
Peter Kwan |