How to correctly display NaN values (missing data points)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

How to correctly display NaN values (missing data points)

Post by ibauer » Fri Oct 20, 2006 7:42 am

Hi!

Using TeeChart 7.07 Professional, BDS2006/Delphi for Win32

I have a group of X-Y values which is not contiguous, i.e. there happen to be some data points where only X-value is provided and corresponding Y-value is NaN (missing data). I use AddXY method of point series to add the data points.

The problem is that at runtime TeeChart is having a difficult time to determine the minimum and maximum values of the point series probably due to presence of NaNs. So I decide to determine these missing data points beforehand and use AddNullXY method to add them to the series. Now the chart is displaying them correctly but since the Y-value is required by AddNullXY method, I have to supply one for each missing data point even if those data points don't have any. This raises another problem - I let my chart Y-axis to determine its scaling automatically, but in order to do it correctly, I must determine the correct Y-values beforehand to make sure they do not exceed the Y-range of existing data points. This is very annoying. Is there a way to add a null data points only by specifying its X-Value so that they do not affect the automatic axis scaling determination?

I would very appreciate your help. Thanks!
Ivo Bauer [OZM Research]

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

Post by Narcís » Fri Oct 20, 2006 9:28 am

Hi Ivo,

I can think of 2 options here:

1. Use AddNull method which only allows a label argument without X and Y values.
2. AddX method which only needs an X value and no Y value.

Is any of those options acceptable for your case?
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

ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

Post by ibauer » Fri Oct 20, 2006 11:13 am

Hi Narcís,

I actually realized that the missing data points don't really need to be visible and that I don't need have them labeled either. So, the best solution would be not to add those missing points (when IsNaN() returns True) to the series in the first place. :oops:

I apologize for a bit harsh tone of my original post, as I'm approaching a project deadline and getting a bit nervous (as always). Your support has always been very good. Got a sleep for couple of hours and everything seems to be better right now.

Thanks!
Ivo Bauer [OZM Research]

Post Reply