XY-Plot Question

TeeChart for ActiveX, COM and ASP
Post Reply
TMECHAM
Newbie
Newbie
Posts: 20
Joined: Tue Aug 17, 2004 4:00 am

XY-Plot Question

Post by TMECHAM » Fri Sep 09, 2005 3:53 pm

I am trying to do a real-time XY Plot where the XY Plot displays like the last 5 minutes of data and updates every 10 seconds with the new point being added and the oldest point being removed. At first it seemed like a very simple solution where I just Delete(0) on the series after I do an AddXY(). The problem is that the series gets reordered after every AddXY(), so Delete(0) removes the smallest value instead of the oldest value. Any thoughts on how to get around this??
Thanks in advance!

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 12, 2005 8:34 am

Hi TMECHAM,

This is most likely you are ordering your series somewhere in your code or else this shoudn't happen. Another method you could use instead of Clear is Delete but I guess if values are ordered it will behave the same way.

For more information on how to optimize TChart performance with real-time charting please read this article. Even though is written in Delphi it can be applied to any other TeeChart version.

If you can't solve your problem, could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
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

TMECHAM
Newbie
Newbie
Posts: 20
Joined: Tue Aug 17, 2004 4:00 am

Post by TMECHAM » Mon Oct 03, 2005 7:16 pm

Hello,
I posted a sample project a couple weeks ago on the attachments forum demonstrating the problem. It is titled "Real time XYPlot". I forgot to reply here when I posted the project, so I figured I better do so now.
Thanks!

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

Post by Narcís » Wed Oct 05, 2005 7:58 am

Hi TMECHAM,

Thanks for advising. To solve this problem you just need to set order to loNone:

Code: Select all

tchart1.Series(0).XValues.Order = loNone
tchart1.Series(1).XValues.Order = loNone
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

TMECHAM
Newbie
Newbie
Posts: 20
Joined: Tue Aug 17, 2004 4:00 am

Post by TMECHAM » Wed Oct 05, 2005 2:26 pm

That's exactly what I was looking for!! Thanks a ton :)

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

Post by Narcís » Wed Oct 05, 2005 2:45 pm

You're welcome :D! I'm glad to hear that helped.
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