As suggested by many posts, it is better to set autorepaint false to speed up plotting great number of data, but when I search the help file, both chart and series have autorepaint property. So which one should I set or should I set both.
And how to disable locking for single thread using C++?
chart autorepaint or series autorepaint
Re: chart autorepaint or series autorepaint
Hi David,
FastLineSeries' autorepaint property prevents the whole chart to be repainted every time the series is updated or a vale is added to it.
Chart's autorepaint property prevents the chart to be repainted at all.
Regarding the threading, here is an explanation about TeeChart limitations.
FastLineSeries' autorepaint property prevents the whole chart to be repainted every time the series is updated or a vale is added to it.
Chart's autorepaint property prevents the chart to be repainted at all.
Regarding the threading, here is an explanation about TeeChart limitations.
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: chart autorepaint or series autorepaint
My question was not answered yet. I know there is autorepaint property for both fastline and chart. My question is which one I should use or should I set both? As in the following code, are the two for loops able to make the plotting even faster? With the chart autorepaint disabled, does it matter to disable/enable series autorepaint?
As for disable locking, in the real-time chart article, it is Basic code as
So my another question is how to realize it in C++?
Code: Select all
m_chart1.SetAutoRepaint(FALSE);
for(int i=0;i<3;i++)
m_chart1.Series(i).GetAsFastLine().SetAutoRepaint(FALSE);
//code to update series(0) to series(3)
for(int i=0;i<3;i++)
m_chart1.Series(i).GetAsFastLine().SetAutoRepaint(TRUE);
m_chart1.SetAutoRepaint(TRUE);
m_chart1.Repaint();
Code: Select all
// When using only a single thread, disable locking:
Chart1.Canvas.ReferenceCanvas.Pen.OwnerCriticalSection := nil;
Series1.LinePen.OwnerCriticalSection := nil;
Re: chart autorepaint or series autorepaint
Hi David,
I recommend you to use series' autorepaint instead of chart's autorepaint. Then, if you need even more optimization, you could try chart's autorepaint instead of series' autorepaint but series drawing is the process that takes more time (incremented with the number of points to show). But, as you suspected, setting chart's autorepaint to false, series' autorepaint to false will be redundant.
Regarding the real-time article, I'm afraid it's not possible to lock TeeChart's pen in ActiveX.
I recommend you to use series' autorepaint instead of chart's autorepaint. Then, if you need even more optimization, you could try chart's autorepaint instead of series' autorepaint but series drawing is the process that takes more time (incremented with the number of points to show). But, as you suspected, setting chart's autorepaint to false, series' autorepaint to false will be redundant.
Regarding the real-time article, I'm afraid it's not possible to lock TeeChart's pen in ActiveX.
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: chart autorepaint or series autorepaint
I am a little bit confused. If series drawing is the process that takes more time, it seems logic to use series' autopaint, but then you said to get more optimization, I should use chart's autopaint. So exactly which way is faster, using series' autopaint or using chart's autopaint?
Re: chart autorepaint or series autorepaint
Hi David,
Series autorepaint to false forces the series to not be redrawn.
Chart autorepaint to false forces the series to not be redrawn but also axes, titles,...
Series autorepaint to false forces the series to not be redrawn.
Chart autorepaint to false forces the series to not be redrawn but also axes, titles,...
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: chart autorepaint or series autorepaint
OK, got it. Thank goodness it is solved before 2010.
Happy new year to you!

Re: chart autorepaint or series autorepaint
Hi David,
The same to you!
The same to you!

Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |