TDBChart summary null values in Labels field

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
jls
Newbie
Newbie
Posts: 30
Joined: Mon Jul 23, 2007 12:00 am

TDBChart summary null values in Labels field

Post by jls » Fri Sep 04, 2009 9:16 am

I try to group a dataset by a field that contains null values.

If the label field (the fileld the vaules are grouped by) contains null the values are not grouped by Null. All null values are added as s new bars.


How can I group all the null values?




Jørgen

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

Re: TDBChart summary null values in Labels field

Post by Narcís » Fri Sep 04, 2009 9:32 am

Hi Jørgen,

Null values in a database must be customly handled as almost everybody marks them in a different way and also everybody wants to treat them in a different way. So you should loop through your datasource and when a null value is identified, you should manually add it to the series using the AddNull and SetNull methods provided.

Alternatively you could iterate your dataset and assign an arbitrary value to null points (zero for example) and also set their colour to clNone. Colour being clNone they will be painted as being null.

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