Page 1 of 1

nulls and colour of pints on tlineseries

Posted: Fri Feb 20, 2009 6:43 pm
by 9231397
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

Posted: Sat Feb 21, 2009 8:24 am
by 9231397
.....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?

Posted: Mon Feb 23, 2009 10:43 am
by yeray
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.