Unable to change SeriesColor for TLineSeries (2010)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
fredff13
Newbie
Newbie
Posts: 5
Joined: Mon Oct 04, 2010 12:00 am

Unable to change SeriesColor for TLineSeries (2010)

Post by fredff13 » Fri Oct 08, 2010 10:36 pm

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Unable to change SeriesColor for TLineSeries (2010)

Post by Sandra » Mon Oct 11, 2010 10:37 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Unable to change SeriesColor for TLineSeries (2010)

Post by Narcís » Mon Oct 18, 2010 10:27 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Steve Maughan
Newbie
Newbie
Posts: 48
Joined: Tue Aug 03, 2010 12:00 am

Re: Unable to change SeriesColor for TLineSeries (2010)

Post by Steve Maughan » Tue Oct 26, 2010 2:05 am

This worked for me! Hopefully is a permanent fix!

Thanks,

Steve

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Unable to change SeriesColor for TLineSeries (2010)

Post by Narcís » Fri Nov 12, 2010 3:26 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply