Watch, Follow, &
Connect with Us

Welcome, Guest
Guest Settings
Help

Thread: Slow drawing of TeeChart with ~50000 points


This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Jan 12, 2017 4:52 AM Last Post By: Yeray Alonso
Anton Sviridov

Posts: 3
Registered: 9/20/10
Slow drawing of TeeChart with ~50000 points  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 29, 2016 1:20 AM
I have TChart (bundled with *XE7*) with several TPointSeries each containing several thousands of points. Points are ordered by X. Periodically (each 5 secs) the timeline moves, i.e. some points from the start are deleted and some are added to the end and then TChart repaints. Points manipulation takes almost nothing but repaint is very slow (~2 sec). For this time application becomes totally non-responsible.
I've read all the tips from [here|http://www.teechart.net/support/viewtopic.php?f=3&t=3449], as well as all real-time chart hints but they didn't help much. TFastLineSeries could be a good option with their ability to not draw points with the same coordinates but they only draw lines while I need just points. I even tried calling Repaint from another thread but the application still freezes.

How can I make the drawing faster or application responsible?
All these options are acceptable:
1) Implement drawing of points with TFastLineSeries so that I could use DrawAllPoints
2) Implement drawing in some background thread while the main window keeps processing user input
3) Have a callback where pixel coordinates of all the points would be accessible with ability to hide separate points (i.e. implement DrawAllPoints feature ourselves)
4) Have TFastPointSeries :)
Yeray Alonso

Posts: 60
Registered: 6/12/11
Re: Slow drawing of TeeChart with ~50000 points
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 16, 2016 2:23 AM   in response to: Anton Sviridov in response to: Anton Sviridov
Hello Anton,

Excuse us for the delayed reply here.

Anton Sviridov wrote:
4) Have TFastPointSeries :)

I've implemented an initial and simple TFastPointSeries. Find it here:

http://www.steema.com/files/public/FastPointSeriesVCL.zip

--
Best Regards

Yeray Alonso
Steema Support Central
Follow us in Twitter and Facebook

"Important note: If you are a TeeChart registered customer,
please post your support questions at Steema's Support
monitored Forums for a prompter reply."
http://support.steema.com
Anton Sviridov

Posts: 3
Registered: 9/20/10
Re: Slow drawing of TeeChart with ~50000 points  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 16, 2016 7:37 AM   in response to: Yeray Alonso in response to: Yeray Alonso
Hello Yeray,
huge thanks for response!
We tested your project but it seems to do not quite what it expected to. The view of the chart significantly changes depending on the flag and style values removing most of the points. I thought the view would be identical and the only difference would be decrease in drawing time. I tried quick&dirty change of source fragment
      if AX=OldX then
         if (not DrawAllPoints and (DrawAllPointsStyle=daFirst)) or (AY=OldY) then
            result:=False;

to
      if (AX=OldX) and (AY=OldY) then
            result:=False;

but it gave less than 100 ms speedup when DrawAllPoints is False (tried 100000 points, drawing times were 650 ms and 570 ms with and without DrawAllPoints respectively).
Anton Sviridov

Posts: 3
Registered: 9/20/10
Re: Slow drawing of TeeChart with ~50000 points  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2017 6:55 AM   in response to: Anton Sviridov in response to: Anton Sviridov
The issue is still actual!
Yeray Alonso

Posts: 60
Registered: 6/12/11
Re: Slow drawing of TeeChart with ~50000 points  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2017 4:52 AM   in response to: Anton Sviridov in response to: Anton Sviridov
Hello,

Anton Sviridov wrote:
The issue is still actual!

We have a version of the TFastPointSeries in the works but we need to polish it. I've added a ticket to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1746

--
Best Regards,

Yeray Alonso
Steema Software
Facebook, Twitter, GPlus, LinkedIn, YouTube, GitHub, RSS
Support Options
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02