lineto?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
KymaNorway
Newbie
Newbie
Posts: 21
Joined: Fri Feb 03, 2006 12:00 am

lineto?

Post by KymaNorway » Fri May 30, 2008 12:22 pm

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...?

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 May 30, 2008 1:14 pm

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.
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

KymaNorway
Newbie
Newbie
Posts: 21
Joined: Fri Feb 03, 2006 12:00 am

Post by KymaNorway » Fri May 30, 2008 1:51 pm

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.

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 May 30, 2008 2:07 pm

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;
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