To append data in real time, AddRealtime or AddArray?

TeeChart for ActiveX, COM and ASP
Post Reply
David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

To append data in real time, AddRealtime or AddArray?

Post by David » Mon Jun 25, 2012 8:54 am

I am trying to continuously append recently acquired data (each time 2K per series, 3 series in total), and the series type I used is FastLine. To use AddRealtime, I could save the last x, and start plot the new data from x+dx. However, if I use AddArray, I had to save all the previous data and plot them altogether. If this appending has to happen 300 times, which method, in theory, would be faster when close to the end?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: To append data in real time, AddRealtime or AddArray?

Post by Yeray » Tue Jun 26, 2012 11:43 am

Hi David,

The main difference between AddArray and AddRealTime functions is, besides to the one you've already observed, that the second draws the new points without repainting the whole chart, and the series will only be redrawn if the axes scale doesn't fit the new points.
The AddArray function clears all the points and it needs to repaint the whole points in the series so it's slower.

A similar question:
http://www.teechart.net/support/viewtop ... 579#p43579
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply