Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 988 - VCL TDBChart response is too slow
Summary: VCL TDBChart response is too slow
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: PC Windows
: High critical
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-30 01:02 EDT by Palanisamy
Modified: 2021-04-23 10:38 EDT (History)
4 users (show)

See Also:
Chart Series: Line
Delphi / C++ Builder RAD IDE Version: RAD XE5


Attachments
this video shows problem of drawing dashed lines ,here it is through chart wizard,wheras actual issue happens through code also (1.32 MB, video/mp4)
2017-10-18 05:43 EDT, prasooncc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Palanisamy 2014-10-30 01:02:10 EDT
I have added a TLineSeries to TDBChart [Version: v2014.10.140123] with display type as Solid. The difference in values of series is big [Example. 1000, 10000] & the chart left axis visible range (max - min) is set to small [Example. 0-10]. With these settings TDBChart display the data correctly. But, changing the display type from Solid to Dash/Dash-Dot/Dash-Dot-Dot takes longer time to update the chart.
Comment 1 david berneda 2014-11-03 05:51:42 EST
Non solid lines are very slow in GDI+ (and also GDI) compared to solid lines.
Also they are very slow in FireMonkey (specially in Android and iOS).

TLineSeries is more best suited to display few points (ie: less than 100) with 3D or 3D orthogonal perspective.

The fastest way to display lots of points is to use a TFastLineSeries instead of a TLineSeries, in 2D and with the DrawStyle property set to flAll:

Series1 ( TFastLineSeries )

Series1.DrawStyle := flAll;
Series1.Pen.Style:=psSolid;

You might also try disabling antialias. This can be done in two ways:

1) At Chart level:

    (Chart1.Canvas as TGDIPlusCanvas).AntiAlias:=False;

2) At FastLine series level:

Series1.FastPen := True;


------------

Here is a link to a demo using FastLine and OpenGL to display one million points repainted 130 times per second:

https://plus.google.com/+Steema/posts/eLycfRSKQws
Comment 2 Palanisamy 2014-11-05 23:37:58 EST
Hi David, Thanks for the reply. We've tried both the options [setting TDBChart's anti alias property to false & using TFastLineSeries] suggested by you. But it is not working & chart response is too slow. Kindly note that we are using C++ Builder XE5 update 2 & TDBChart version is v2014.10.140213.
Comment 3 prasooncc 2017-10-18 05:43:36 EDT
Created attachment 788 [details]
this video shows problem of drawing dashed lines ,here it is through chart wizard,wheras actual issue happens through code also
Comment 4 yeray alonso 2021-04-23 10:38:44 EDT
We've revised #2006 improving the DrawAllPointsStyle daMinMax performance for the FastLine:
http://bugs.teechart.net/show_bug.cgi?id=2006

Ie:

  Series1.DrawAllPoints:=false;
  Series1.DrawAllPointsStyle:=daMinMax

With it, drawing 1 million points takes 0.08 sec with solid line and 0.26 sec with dashed pen style.