Surpress 0 or null values when using TDBCrossTabSource

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Ewestenend
Newbie
Newbie
Posts: 9
Joined: Thu Sep 24, 2009 12:00 am

Surpress 0 or null values when using TDBCrossTabSource

Post by Ewestenend » Fri Sep 24, 2010 7:58 am

Hi,

I have a dataset and want to remove/surpress 0 values.
What I am using and need is a TDBCrossTabSource for showing summaries in a chart.
Sometimes a record can contain a 0 value and I like to be able to leave them out of the chart before the specified seriespoint is drawn. By filtering the dataset on records with a value greater then 0 I get less records already. The TDBCrossTabSource component creates series but seems to need an equal number of records to create those series. And is automatically drawing those 0 zero based points. If I use this for example : Series1.SetNull(ValueIndex), then the seriespoint isn't shown but the layout of the chart becomes a bit messy I think.
How can I make sure that all points are drawn on the total width of the TChart as it is done when there are no 0 zero values?

See image attached for a screenshot what the issue/problem is.

Thanks,
Eric.
Attachments
SurpressEmptyValue.JPG
SurpressEmptyValue.JPG (37.15 KiB) Viewed 4057 times

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Surpress 0 or null values when using TDBCrossTabSource

Post by Yeray » Fri Sep 24, 2010 3:47 pm

Hi Eric,

I'm afraid it's not possible right now. I've added it to the wish list to be implemented in future releases (TV52015171).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Ewestenend
Newbie
Newbie
Posts: 9
Joined: Thu Sep 24, 2009 12:00 am

Re: Surpress 0 or null values when using TDBCrossTabSource

Post by Ewestenend » Mon Sep 27, 2010 2:08 am

Hi,

And what if I create series manually? Might that be an option?
If yes how I'm gone accomplish it then and you have an example doing this?

Maybe you can use the testproject attached as a reference.

Thanks,
Eric.
Attachments
TestChart.zip
(3.95 KiB) Downloaded 252 times

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

Re: Surpress 0 or null values when using TDBCrossTabSource

Post by Narcís » Mon Sep 27, 2010 11:18 am

Hi Eric,

What about using bottom axis MinimumOffset?

Code: Select all

  Chart1.Axes.Bottom.MinimumOffset:=-1;
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

Ewestenend
Newbie
Newbie
Posts: 9
Joined: Thu Sep 24, 2009 12:00 am

Re: Surpress 0 or null values when using TDBCrossTabSource

Post by Ewestenend » Tue Sep 28, 2010 2:24 am

Hi,

Yes that will hide the first point yes. But what if I have zero point somewhere in the middle? And what in case paging is enabled?
I'm affraid this is not gone work isn't it?

Thanks.
Eric.

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

Re: Surpress 0 or null values when using TDBCrossTabSource

Post by Narcís » Wed Sep 29, 2010 9:53 am

Hi Eric,

No, it won't. If you don't want those points to be displayed at all why don't you remove them from the series?
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