I am using TChart version 8.06 to create a real time graph. When I add the data points via AddXY, I am adding a label for each point. If the users sets up their graph to hold hundred of thousands of data points, and to delete most, or all, of those points when the graph is full, the call to the series's delete function can take a very long time. For example, if I have 500,000 points in my graph, all of which have a label, the function call "series.Delete(0, 499,999)" can take well over 50 seconds. If I do not add a label in the AddXY function, then that same function all takes about 1 millisecond.
Is this a TChart bug, or is there some kind of optimization that I should be doing?
Series.Delete function takes too long with labels
Re: Series.Delete function takes too long with labels
Hello slvjm,
Sorry for the delay. I have added your request in wish-list with number [TV52015622] to be consider it inclusion in future versions of TeeChartVCL. On the other hand, I think can be helpful for you, use FastLine Series, so if you use it the problem about performance disappears and the Chart is painted faster, to check it you only have change Point Series to FastLineSeries.
Thanks,
Sorry for the delay. I have added your request in wish-list with number [TV52015622] to be consider it inclusion in future versions of TeeChartVCL. On the other hand, I think can be helpful for you, use FastLine Series, so if you use it the problem about performance disappears and the Chart is painted faster, to check it you only have change Point Series to FastLineSeries.
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Series.Delete function takes too long with labels
For me, this happens with both the TLineSeries and the TFastLineSeries. However, the drawAllPoints property was set to true. Perhaps setting this to false makes a difference with the TFastLineSeries? I will have to experiment a bit more.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Series.Delete function takes too long with labels
Hi slvjm,
Yes, for sure! DrawAllPoints feature was implemented for performance purposes. There's also DrawAllPointsStyle property which may help you find the most suitable approach to your needs.Perhaps setting this to false makes a difference with the TFastLineSeries?
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 |