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!
XY-Plot Question
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi TMECHAM,
Thanks for advising. To solve this problem you just need to set order to loNone:
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
You're welcome ! 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 |
Instructions - How to post in this forum |