I have transferred a Delphi software project using TeeChart Pro from TeeChart version 7 (and BDS 2006) to TeeChart version 2010 (and RAD-Studio 2010). Now everything worked fine except of one (little?) problem:
The following code fragment should color each point of a LineSeries in a different color, depending on the value of SpecViolationLevel (0..3):
Code: Select all
TLineSeries(Series).ColorEachLine:=False;
Series.SeriesColor:=clBlue;
for j:=0 to Count-1 do
begin
if Data[j].Value.Valid then
begin
case Data[j].SpecViolationLevel of
0: Series.AddXY(Data[j].GetCurrentXValue(j),Data[j].Value.Value,GetXLabel(j),clblue);
1: Series.AddXY(Data[j].GetCurrentXValue(j),Data[j].Value.Value,GetXLabel(j),clYellow);
2: Series.AddXY(Data[j].GetCurrentXValue(j),Data[j].Value.Value,GetXLabel(j),clRed);
3: Series.AddXY(Data[j].GetCurrentXValue(j),Data[j].Value.Value,GetXLabel(j),clPurple);
end;
end;
end;
I did not set the property Series.ColorEachPoint in my code. However - as I explained - it worked in this way before I changed to the new TeeChart version.
Using Series.ColorEachPoint:=true did not have any effect in my case.
Do you have any idea or help?
Thanks,
Andreas