Time for adding a point

Hello. I would like to ask, is there a way to make adding points to the chart faster? For example, addding X;Y point to GoogleChart / TeeChart takes less than 1ms, and uppon testing FNCChart, simply "AddXY" command takes from 50 to 70ms to execute. Ive tried adding 360 points to a chart, and it takes roughly 30 seconds to fully execute :slight_smile:

Use TMSFNCChart1.BeginUpdate & TMSFNCChart1.EndUpdate around the code to speed up the process of adding points.

Thank you, that lowers the time to add single point to roughly 30 milliseconds. Still a bit too high, it would be great if i could place a point in less than 5ms :frowning:

Nevermind, did further tests - its not the adding points what takes the time, but displaying those points. Adding 10k points to series takes around 700ms, adding another 10k (when you already have 10k) around 1.4 seconds, then 2.1 seconds for another 10k and so on.. But if you hide series and add points to it - adding 10k points themselves takes around 22ms, but displaying the series takes a good second

The more points you display, the more time it will take. It might be a good idea to limit the amount of points being displays for performance reasons.

Sadly since im using the chart to display complex shapes and routes, limiting the amount of points is not an option. Is there a way to disable auto update of the chart or something like that? Its interesting that displaying lets say 10k points takes around a second, but also adding a single one when you got all that on display - it feels like it redraws all 100001 point when you add single one, instead of just adding it to the plot

That's technically not possible. When adding a point, it redraws the whole canvas. This is required in other cross-platform canvas implementations.

1 Like