Sparse data and TreatNulls?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Russ
Newbie
Newbie
Posts: 7
Joined: Tue Nov 13, 2007 12:00 am

Sparse data and TreatNulls?

Post by Russ » Tue Apr 21, 2009 11:23 pm

I've got a chart displaying multiple series. The area style for each is set for CustomStack.Stack. Each series contains multiple subranges of valid values. I would like to have only those values graphed. So I might have the following data for one series.

{0, 1}
{1, 3}
{2, 2}

{10, 4}
{11, 2}
{12, 3}
{13, 3}

{22, 2}
{23, 4}

Y == 0 is the min for the y axis, and gaps in data correspond to points where y == 0. There will be something on the order of 10 non-represented "zero" points for each non-zero point.

And there will be multiple series, each with sparse data, but the gaps may not align on the x axis.

These points are not data bound, but rather they are added at runtime using series.Add(x,y).

Plus the transitions to/from zero are desired to be vertical, no slope, though this is not really important due to the data granularity.

Any suggestions other than to fill in the gaps with points where Y == 0? It seems that TreatNullsStyle.DoNotPaint does not help here.

Russ
Newbie
Newbie
Posts: 7
Joined: Tue Nov 13, 2007 12:00 am

Post by Russ » Wed Apr 22, 2009 12:30 am

I've also tried the stacked bar style, which I thought might be more agreeable with the sparse data.

Seems this just doesn't work well with the stacking. Is it necessary to add matching "zero" entries in each series for each non-zero entry in a different series?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Wed Apr 22, 2009 10:31 am

Hello Russ,

When you drawing series stacked you have two things in mind :

First:

The number of points there are the same, you could that put null or "zeros" points in the series that you not want more points.

Second:

It's more important for series drawing stacked that all series are same x values, because there are different points x the series not draw one over the other.
Seems this just doesn't work well with the stacking. Is it necessary to add matching "zero" entries in each series for each non-zero entry in a different series?
Yes, As I explain previous.


Thanks,
Best Regards,
Sandra Pazos / 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

Russ
Newbie
Newbie
Posts: 7
Joined: Tue Nov 13, 2007 12:00 am

Post by Russ » Wed Apr 22, 2009 7:42 pm

Thanks, that's pretty much the conclusion I came to yesterday. In fact, I already implemented it and it seems to work well enough. Because the data is so sparse, I still store and wire transfer only non-zero sub-ranges, but when I load the chart, I process those into contiguous series data. Just feels wrong to generate (potentially) tens of thousands of zero values for EACH series (may be up to 20+ series!), depending on chart scale. We'll see how it affects real world usage, but because of this, I may now have to implement some sort of down sampling for cases where the x axis scale is larger than some as yet undefined limit.

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

Post by Narcís » Thu Apr 23, 2009 10:17 am

Hi Russ,

You may be interested in TeeChart's existing DownSampling features. You'll find examples at All Features\Welcome !\Functions\Extended\Reducing number of points
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