Page 1 of 1
Unable to change SeriesColor for TLineSeries (2010)
Posted: Fri Oct 08, 2010 10:36 pm
by 16557375
Hi, I think you fixed bug for TeeChart VCL version 8 (TV52014124) but we are using 2010. I just installed it but I still did not get TLineSeries color that changed in run-time. They are keeping design-time colors! The only solution is to create all series from scratch.
Thanks, Fred
Re: Unable to change SeriesColor for TLineSeries (2010)
Posted: Mon Oct 11, 2010 10:37 am
by 10050769
Hello Fred,
You are right. I have added your request in bug list with number [TV52015199]. We will try to fix it for next versions of TeeChart VCL.
Thanks,
Re: Unable to change SeriesColor for TLineSeries (2010)
Posted: Mon Oct 18, 2010 10:27 am
by narcis
Hi Fred,
I found that this issue can be solved with a couple of simple changes at DrawPoint nested method in TCustomSeries.DrawValue at Series.pas:
Code: Select all
if (not View3D) and FDrawLine then
begin
// ???
if LinePen.Color <> clBlack then
begin
if LinePen.Color <> SeriesColor then
begin
tmpColor:=LinePen.Color;
SeriesColor:=LinePen.Color;
end;
end
else
LinePen.Color:=SeriesColor;
CheckMaxPixelXY;
DrawLine2D;
end;
We are investigating why this was changed. If everything is correct we will add the fix to the next maintenance release.
Re: Unable to change SeriesColor for TLineSeries (2010)
Posted: Tue Oct 26, 2010 2:05 am
by 16556683
This worked for me! Hopefully is a permanent fix!
Thanks,
Steve
Re: Unable to change SeriesColor for TLineSeries (2010)
Posted: Fri Nov 12, 2010 3:26 pm
by narcis
Hi Steve,
A client found an issue with previous code and I think I found a better solution to TV52015199 which is using this code:
Code: Select all
if (not View3D) and FDrawLine then
begin
if ColorEachLine then
tmpColor:=ValueColor[ValueIndex]
else
if LinePen.Color <> clBlack then
begin
if LinePen.Color <> SeriesColor then
begin
tmpColor:=LinePen.Color;
SeriesColor:=tmpColor;
end;
end
else
tmpColor:=SeriesColor;
CheckMaxPixelXY;
DrawLine2D;
end;
Can you please test if this works fine at your end?
Thanks in advance.