Page 1 of 1

Colouring points individually

Posted: Wed Jul 13, 2016 3:07 pm
by 16575285
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

Re: Colouring points individually

Posted: Fri Jul 15, 2016 7:20 am
by yeray
Hi Toreba,

Try setting:

Code: Select all

Series1.ColorEachPoint:=true;

Re: Colouring points individually

Posted: Fri Jul 15, 2016 2:38 pm
by 16575285
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

Re: Colouring points individually

Posted: Fri Jul 15, 2016 3:29 pm
by yeray
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.

Re: Colouring points individually

Posted: Mon Jul 18, 2016 10:55 am
by 16575285
Yeray,

Yes, that makes sense. Thanks for your help.

Regards

Toreba