NULL values

TeeChart for ActiveX, COM and ASP
Post Reply
JC
Newbie
Newbie
Posts: 9
Joined: Tue Feb 01, 2005 5:00 am
Location: South Africa

NULL values

Post by JC » Thu Sep 06, 2007 12:18 pm

Hi Support

Sometimes we have to use ADDNullXY to add null values to our charts. Looking at the chart it is correct but when it is exported or when the values are looked at on the Data tab there are "zeros" for the NULL values.

How can these values be replaced with NULL? We do not want zero's because when data is exported it is not possible to distinguish between real zeros and NULLs.

Thanks
JC

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 Sep 06, 2007 1:02 pm

Hi JC,

Which TeeChart version are you using? In v7 and v8 null values preserve they original values and their color is set to be transparent (clNone).
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

JC
Newbie
Newbie
Posts: 9
Joined: Tue Feb 01, 2005 5:00 am
Location: South Africa

Post by JC » Fri Sep 07, 2007 7:15 am

Hi Narcís

Thansk for your reply!

We are using V7.
We pass a zero to the AddNullXY function and that is the reason for the zeros when the data must be exported.

Example:
If data is displayed on a chart per half hour (there must be a value every 30 minutes) between 00:30 and 06:00,
*data is available from 00:30 to 02:30; 04:00 to 06:00
*data missing for 03:00 and 03:30

If no AddNullXY value is inserted for the missing values a straight line will be drawn between 02:30 and 04:00 - this is not correct because there are not any values available for 03:00 and 03:30.

If AddNullXY is used for 03:00 and 03:30 and Y is 999, the chart will look correct because of a gap between 02:30 and 04:00 but if the data is exported 03:00 and 03:30 will have values of 999 but should (in our case) be NULL.

I hope the example gives you a better idea of the problem.

Regards,
JC

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 Sep 07, 2007 8:23 am

Hi JC,

Thanks for the information.

First of all please notice that TeeChart Pro ActiveX is a COM wrapper of TeeChart Pro VCL. This means that in VCL null values doesn't exist and thus null values can be saved. In that case you should check if point's color is clNone or you could even add a label to the point saying something like "NULL" so that points are clearly marked as null, for example:

Code: Select all

    TChart1.Series(0).AddNullXY X, Y, "NULL"
It may also help you using something like in the All Features\Welcome!\Chart Styles\Financial\Candle (OHLC)\Axis Labels no Weekends example at the features demo. You'll find the demo at TeeChart's program group.

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

JC
Newbie
Newbie
Posts: 9
Joined: Tue Feb 01, 2005 5:00 am
Location: South Africa

Post by JC » Mon Sep 10, 2007 2:51 pm

Hi Narcís

The problem is not with the chart or how it is displayed.

When exporting the values is should be NULL or blank where AddNullXY is used.

Kind Regards
JC

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

Post by Narcís » Mon Sep 10, 2007 2:57 pm

Hi JC,

As I told you, setting values to NULL is not possible as this type is not available. Regarding leaving them blank, you can create a non-visible dummy series where you add all values except the null ones and then only export those 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

JC
Newbie
Newbie
Posts: 9
Joined: Tue Feb 01, 2005 5:00 am
Location: South Africa

Post by JC » Fri Nov 02, 2007 9:13 am

Hi Narcís,

Sorry for only getting back to you now.

If you create a non-visible series as you suggest the value will not be exported correctly in our case. If there should be a value every thirty minutes and one value is missing there will be no “place holder” for that value – at first glance you will not see that there is a value missing, you will have to go and check each data/time value to make sure they follow one another correctly.

I think this will be a great enhancement to TeeChart and would like you to consider changing AddNullXY function to have a NULL value.

Kind Regards
JC

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 Nov 02, 2007 9:32 am

Hi JC,

As I told you in my previous reply, this is not possible because NULL value is not available in VCL (notice that TeeChart Pro ActiveX is a COM wrapper of the VCL version).

The only solution I can think of is that you manually export your series data and process null values as desired.
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