Colouring points individually

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Toreba
Newbie
Newbie
Posts: 29
Joined: Wed Sep 02, 2015 12:00 am

Colouring points individually

Post by Toreba » Wed Jul 13, 2016 3:07 pm

Hi,

With a TLineSeries, I colour values according to a quality atribute. To do this I use TLineSeries.AddXY(Const AXValue, AYValue: TChartValue; Const ALabel: String; AColor: TColor), and everything is fine. The pointers are coloured as expected. Each line segment takes the colour of the following point.

But, if the TLineSeries is created first from a saved template, and has its properties assigned using the method AssignFormat, then it seems that the AddXY method colours only the line segments, and not the pointers.

Is there a property of a TLineSeries that separately controls whether line segments and pointers receive the colour specified in the call to AddXY?

Thanks for any advice.

Toreba

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Colouring points individually

Post by Yeray » Fri Jul 15, 2016 7:20 am

Hi Toreba,

Try setting:

Code: Select all

Series1.ColorEachPoint:=true;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Toreba
Newbie
Newbie
Posts: 29
Joined: Wed Sep 02, 2015 12:00 am

Re: Colouring points individually

Post by Toreba » Fri Jul 15, 2016 2:38 pm

Yeray,

I think that both properties 'ColorEachPoint' and 'ColorEachLine' are true by default, and so are not saved to stream with the method SaveChartToStream. So when I then use the method AssignFormat to apply a 'template' from a saved graph to a new series, these two property settings will be absent and so these properties will not be set in the target series. Is that correct?

Regards

Toreba

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Colouring points individually

Post by Yeray » Fri Jul 15, 2016 3:29 pm

Hello Toreba,

That's correct. The properties that rest in the their default aren't streamed so they aren't loaded in the new object, but the properties should again be in their defaults.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Toreba
Newbie
Newbie
Posts: 29
Joined: Wed Sep 02, 2015 12:00 am

Re: Colouring points individually

Post by Toreba » Mon Jul 18, 2016 10:55 am

Yeray,

Yes, that makes sense. Thanks for your help.

Regards

Toreba

Post Reply