Page 1 of 1
lineto?
Posted: Fri May 30, 2008 12:22 pm
by 9345189
I have a graph which presents data from an electronic device. the horizontal axis is datetimes, the vertical axis is numbers.
At some times I do not receive data from the electronic device.
Is there a way to add lines only when I recieve data, and make an empty space in the graph when no data is recieved?
currently I am using a Serie of type 'line' and doing AddXY(MyDate,MyData);... But I guess I should use a lineto() or something...?
Posted: Fri May 30, 2008 1:14 pm
by narcis
Hi KymaNorway,
I recommend you to use TreatNulls property as shown on the example at What's New?\Welcome!\New in Series\Horiz.Line/Line\TreatNuls and What's New?\Welcome!\New in Series\Horiz.Line/Line\Fast Line TreatNulls in the new features demo, available at TeeChart's program group.
Posted: Fri May 30, 2008 1:51 pm
by 9345189
Thank you, however this is not what I am looking for.
The values in my dataset can be 0, which would be an acceptable value. But sometimes no data has been recorded.
clock , datavalue
--------------------
12:00 - 4000
12:01 - 4012
12:02 - 4018
12:03 - 4017
....... no data.....
13.52 - 0
13:53 - 0
13:54 - 4
13:55 - 8
13:56 - 20
My graph should display the 0's, but it should hide the graph where I have no data.
btw, I am using TeeChart 7.12.
Posted: Fri May 30, 2008 2:07 pm
by narcis
Hi KymaNorway,
In that case you should add a null point where there's no data for the series, for example:
Code: Select all
With Series1 do
begin
AddXY(0, 4000);
AddXY(1, 4012);
AddXY(2, 4018);
AddXY(3, 4017);
Series1.AddNull('');
AddXY(52, 0);
AddXY(53, 0);
AddXY(54, 4);
AddXY(55, 8);
AddXY(56, 20);
end;