Page 1 of 1

Null Values in DBChart

Posted: Mon Sep 08, 2008 2:25 pm
by 10549646
Hello!

I'm using a DBChart with LineSeries to display values from a database. The problem is that there is more than one logging-session in the table which may be identified by a field which specifies a unique session-id.
How can I add a space (something like AddNull()) when this field changes?
Or do I have to switch to a normal Chart component and add the data myself? The problem is, that I use AutoRefresh because sometimes the data shall be displayed while the logging is in progress...

Hope you can help me.
Regards, Stefan

Posted: Tue Sep 09, 2008 8:18 am
by narcis
Hi Stefan,

I can think of 2 options here:

1. Handle null values manually and therefore add them manually to the series.

2. Add values to your series automatically and then search for those values that should be null and set them to be null using SetNull method or setting their color to clNone. As can be seen in the help file for SetNull method:

Makes the ValueIndex referred point to be "hidden" (invisible).

Corresponds to setting the point's color to "clNone":

Series1.SetNull( 123 )

...is the same as...

Series1.ValueColor[ 123 ] := clNone



Hope this helps!