Is it possible not to load null-values into DBChart?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Sigurdur I. Gunnlaugsson
Newbie
Newbie
Posts: 8
Joined: Fri Oct 01, 2004 4:00 am

Is it possible not to load null-values into DBChart?

Post by Sigurdur I. Gunnlaugsson » Thu Jul 12, 2007 10:30 am

I have a table connected with DBChart. I have many signals that are draw on the same chart. These signals have different sampling rates, which means that for one signal I may have 100 samples, while for another I may have only 10. Yet they all live in the same table.

When the signals are loaded into the DBChart, the null values are also included in the series. Having nulls in the series complicates many calculations I make, therefore I would like to get rid of them.

Currently I use a loop to remove all the nulls from the series, using IsNull(i), and Delete(i). However, for large datasets (200K+) and many nulls, this is sometimes taking like 6 minutes, which really is too much.

Is it possible to ask DBChart simply to ignore the nulls, and dont load them into the series?

Regards,
Sigurdur

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jul 13, 2007 10:05 am

Hi Sigurdur,

the new TeeChart Pro v8 includes a new feature to treat nulls for most of Series types.
For example the following styles can be applied at the time to load the Series data :

TTreatNullsStyle :
- tnDontPaint means the line between a non-null and a null point is displayed but the line from the null point to the next point is not displayed.
- tnSkip means the lines between a non-null point and the null point and the next non-null point are not displayed.
- tnIgnore means all points are considered non-null.

Sigurdur I. Gunnlaugsson
Newbie
Newbie
Posts: 8
Joined: Fri Oct 01, 2004 4:00 am

Post by Sigurdur I. Gunnlaugsson » Fri Jul 13, 2007 2:23 pm

The problem is that all the functionality depends on there not-being nulls in the series. I would need to add if IsNull(i) into a lot of places. On some places it would be simple, while on some places it would not be as simple. In addition, it would require re-testing the whole chart functionality, which would be quite an effort.

I guess the only solution is to load the data myself into the graph, using AddXY or something similar. If I do that, will the data be transferred to the table? Please correct me if I am wrong.

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Jul 24, 2007 9:03 am

Hi,

if you load the data manually, even if you have referenced the Series to any Dataset they wont be transfered to the table. All data entered manually wont be save into the table.

An option to save the Series data entered manually to a dataSet is to use the TSeriesDataSet component, it allows you to create tables with Series data,...
Please take a look the help file if it can help you.

Post Reply