Page 1 of 1

Refreshing a chart containing half a million points

Posted: Mon Apr 11, 2016 5:44 pm
by 16575285
Hi,

A user has generated a chart containing multiple series including a THistogramSeries with nearly 200,000 data values, and another TLineSeries containing nearly 250,000 points. You may ask why they do this, as there's no way you can see the detail of so many points on one chart. But, once generated, merely moving the mouse over the graph causes the application to seemingly hang while, I presume, the pixels obscured by the moving cursor are repainted. I don't know whether the chart is laboriously recalculating all the pixel positions for these series, but is there any way I can improve performance? Do I need to persuade users to be satisfied with all their data as TFastLineSeries?

Thanks for any advice

Toreba

Re: Refreshing a chart containing half a million points

Posted: Tue Apr 12, 2016 10:47 am
by yeray
Hello Toreba,

Try disabling Hover feature if it's enabled.

Find here some tips to improve the performance when drawing many points:
http://www.teechart.net/support/viewtop ... 302#p67870

Re: Refreshing a chart containing half a million points

Posted: Mon Apr 18, 2016 12:05 pm
by 16575285
Hi Yeray,

Thanks for your advice.

I disabled the hover feature, but this did not seem to have much effect.

Which a much smaller chart comprising 2500 data values in a THistogramSeries, it looks as if something else is going on as the user moves the mouse anywhere on the TChart (including the legend) that causes my application to run at 100% of its processor for many tens of seconds. What else can be happening that is so CPU intensive?

Also, I have both TChart.DoubleBuffered and TChart.BufferedDisplay set to true. Is that sensible, or is it effectively triple-buffering?

Regards

Toreba

Re: Refreshing a chart containing half a million points

Posted: Mon Apr 18, 2016 3:25 pm
by yeray
Hello Toreba,

Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

Re: Refreshing a chart containing half a million points

Posted: Wed Apr 20, 2016 12:37 pm
by 16575285
Yeray,

Actually I was wrong. The Hover property makes a massive difference when plotting these many points, and the problem disappears if I switch it off.

Sorry for the mistake, and thanks for your advice. Very helpful as ever.

Regards

Toreba

Re: Refreshing a chart containing half a million points

Posted: Wed Apr 20, 2016 1:27 pm
by yeray
Hi Toreba,

I'm glad you found how to make it work as you wish! :D