AreaSeries: different area colors above or under origin valu
Posted: Fri Apr 29, 2005 1:17 pm
Hello,
I have a TAreaSeries, and I want different area colors for values above or under the "origin" value of the chart.
I can explain what I wish with an example.
I set my TAreaSeries chart origin to 200. I want a green color for areas above 200, and red color for areas under 200, as in the figure below:
Unfortunately, I obtain the follow:
For my purpose, I used the OnAfterAdd event:
As you can see, there are wrong coloured part, when passing from "above" to "under" the origin and vice-versa.
Is there any solution, using just one series, to get what I want?
I'm using TeeChartPro v 7.02
Thank you
I have a TAreaSeries, and I want different area colors for values above or under the "origin" value of the chart.
I can explain what I wish with an example.
I set my TAreaSeries chart origin to 200. I want a green color for areas above 200, and red color for areas under 200, as in the figure below:
Unfortunately, I obtain the follow:
For my purpose, I used the OnAfterAdd event:
Code: Select all
if Sender.YValues[ValueIndex] > 200 then
Sender.ValueColor[ValueIndex] := clGreen
else
Sender.ValueColor[ValueIndex] := clRed;
Is there any solution, using just one series, to get what I want?
I'm using TeeChartPro v 7.02
Thank you