Null Values in DBChart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
kroimon
Newbie
Newbie
Posts: 7
Joined: Thu Jul 17, 2008 12:00 am

Null Values in DBChart

Post by kroimon » Mon Sep 08, 2008 2:25 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Sep 09, 2008 8:18 am

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!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply