|
Multi color in drawling line |
Posted by Papa Raihan on Jan-02-2010 20:07 |
|
Hi, I am interested in chartDirector and now still learning to get used to it...
I would like to draw a line with multicolor like attached, which function should I call?
Thank you
|
Re: Multi color in drawling line |
Posted by Peter Kwan on Jan-04-2010 00:20 |
|
Hi Papa,
There are two methods:
(a) If there are only two or a few segments, you may use the method in the "X Zone Coloring" sample code. You may look for "X Zone Coloring" from the ChartDirector documentation index to locate the sample cpde.
(b) If there are arbitrarily many segments, you would need to split your line into two layers. The blue layer should contain only the blue segments (with the points from the red segments replaced by NoValue). The red layer should contain only the red segments. When the two layers are drawn together, you will get the chart you want.
Hope this can help.
Regards
Peter Kwan |
|