Page 1 of 1

TDBChart summary null values in Labels field

Posted: Fri Sep 04, 2009 9:16 am
by 10546183
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

Re: TDBChart summary null values in Labels field

Posted: Fri Sep 04, 2009 9:32 am
by narcis
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!