nulls and colour of pints on tlineseries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

nulls and colour of pints on tlineseries

Post by seanmurphy » Fri Feb 20, 2009 6:43 pm

I'm using a chart with many tlineseries, and am colouring individual points on each series with ongetpointerstyle. Works fine except when the series hold null values.

data is array of x,y,z (z is a variable value, eg. water depth)

if some_condition then
chart.series[series_no].AddXY(x,y)
else
chart.series[series_no].AddNullXY(0,0);


then in the chartseriesgetpointerstyle I have code that
get the value of z from data records using the valueindex passed to
the method, and set the valuecolor[valueindex] according to a palette.

This all works okay except when there are nulls. How can I test in the
getpointerstyle method if an x,y point s null. Something like
if chart[series_no].isnull[valueindex] ??

thanks
Sean

seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

Post by seanmurphy » Sat Feb 21, 2009 8:24 am

.....ongetpointerstye behaves of valueindex does not count null data. eg. if series values are 0..100, but all odd indexes are null, then ongetpointerstyle only gets activated for 50 of the 0..100 points, those that are not null. Is that correct?

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

Post by Yeray » Mon Feb 23, 2009 10:43 am

Hi seanmurphy,
seanmurphy wrote:How can I test in the getpointerstyle method if an x,y point s null. Something like if chart[series_no].isnull[valueindex] ??
Yes, there is the method IsNull(ValueIndex) for series that returns a boolean.
seanmurphy wrote:ongetpointerstye behaves of valueindex does not count null data
Yes, OnGetPointerStyle event is fired only for non-null values.
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

Post Reply