Refreshing a chart containing half a million points

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Toreba
Newbie
Newbie
Posts: 29
Joined: Wed Sep 02, 2015 12:00 am

Refreshing a chart containing half a million points

Post by Toreba » Mon Apr 11, 2016 5:44 pm

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

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

Re: Refreshing a chart containing half a million points

Post by Yeray » Tue Apr 12, 2016 10:47 am

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
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

Toreba
Newbie
Newbie
Posts: 29
Joined: Wed Sep 02, 2015 12:00 am

Re: Refreshing a chart containing half a million points

Post by Toreba » Mon Apr 18, 2016 12:05 pm

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

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

Re: Refreshing a chart containing half a million points

Post by Yeray » Mon Apr 18, 2016 3:25 pm

Hello Toreba,

Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
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

Toreba
Newbie
Newbie
Posts: 29
Joined: Wed Sep 02, 2015 12:00 am

Re: Refreshing a chart containing half a million points

Post by Toreba » Wed Apr 20, 2016 12:37 pm

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

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

Re: Refreshing a chart containing half a million points

Post by Yeray » Wed Apr 20, 2016 1:27 pm

Hi Toreba,

I'm glad you found how to make it work as you wish! :D
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