Board index » cppbuilder » TChart: BeginUpdate() or similar?

TChart: BeginUpdate() or similar?


2004-01-03 06:38:43 AM
cppbuilder110
Hi,
I use a TChart with a TLineSeries. During adding several thousand values to
the TLineSeries in a loop, I want the TChart to wait before drawing itself
to save time. My TAdvStringGrid on the same form has BeginUpdate() and
EndUpdate() functions. What do I have to use with the TChart?
Thanks,
Thomas
 
 

Re:TChart: BeginUpdate() or similar?

There is a BufferedDisplay property that by default is supposed to be set to true.
From the help file:
BufferedDisplay
This public property controls how Charts are internally drawn. When True, the default,
Charts are drawn into an internal hidden bitmap. When drawing is finished, this
internal bitmap is transferred to the screen in one single operation. The result is
non-flickering animation.
It sounds like it should already be doing what you are talking about.
You may also want to look at
TFastLineSeries
some of the properties are different and there are no methods or events.
On 1/2/2004 4:38 PM Thomas Blankschein spoke thusly
Quote
Hi,

I use a TChart with a TLineSeries. During adding several thousand values to
the TLineSeries in a loop, I want the TChart to wait before drawing itself
to save time. My TAdvStringGrid on the same form has BeginUpdate() and
EndUpdate() functions. What do I have to use with the TChart?

Thanks,
Thomas


 

Re:TChart: BeginUpdate() or similar?

"Thomas Blankschein" < XXXX@XXXXX.COM >wrote:
Quote
[...] What do I have to use with the TChart?
You can try:
SendMessage( Chart1->Handle, WM_SETREDRAW, FALSE, 0 );
....
SendMessage( Chart1->Handle, WM_SETREDRAW, TRUE, 0 );
~ JD
 

{smallsort}

Re:TChart: BeginUpdate() or similar?

"Thomas Blankschein" < XXXX@XXXXX.COM >wrote:
Quote

Unfortunately this doesn't change anything.
Then try locking updates to the entire form:
LockWindowUpdate( this->Handle );
....
LockWindowUpdate( 0 );
~ JD
 

Re:TChart: BeginUpdate() or similar?

Hi JM,
thanks for your hints.
Quote
BufferedDisplay
It sounds like it should already be doing what you are talking about.
Yes, you are right.
Quote
You may also want to look at
TFastLineSeries
That increased the speed of my chart dramatically. Thanks again :-)
Thomas
 

Re:TChart: BeginUpdate() or similar?

Hi JD,
Quote
You can try:
SendMessage( Chart1->Handle, WM_SETREDRAW, FALSE, 0 );
SendMessage( Chart1->Handle, WM_SETREDRAW, TRUE, 0 );
Unfortunately this doesn't change anything. Maybe the BufferedDisplay
property does internally something similar. Like I already told JM the use
of TFastLineSeries increased the speed. I don't need all those fancy things
from TLineSeries.
Thomas
 

Re:TChart: BeginUpdate() or similar?

In addition to using TFastLineSeries also set the DrawAllPoints property to
false. This will increase speed dramatically.
You should perhabs also have a look a the AutoRepaint property. I have set i
to false in one of my programs which add a huge amount of points, but can't
remeber if that was speed related thing.
Palle
"Thomas Blankschein" < XXXX@XXXXX.COM >skrev i en meddelelse
Quote
Hi JM,

thanks for your hints.

>BufferedDisplay
>It sounds like it should already be doing what you are talking about.

Yes, you are right.

>You may also want to look at
>TFastLineSeries

That increased the speed of my chart dramatically. Thanks again :-)

Thomas


 

Re:TChart: BeginUpdate() or similar?

Hi,
Quote
In addition to using TFastLineSeries also set the DrawAllPoints property
to
false. This will increase speed dramatically.
sorry, but I can't find this property. I have BCB5 prof. Can you give me a
hint?
Thanks,
Thomas
 

Re:TChart: BeginUpdate() or similar?

It is a property on the TFastLineSeries. At least in TeeChart 6
professional, which I use. It might not be available in the free TeeChart
version supplied by BCB.
I am using BCB6, but it should not make any difference in this regard.
Palle
"Thomas Blankschein" < XXXX@XXXXX.COM >skrev i en meddelelse
Quote
Hi,


>In addition to using TFastLineSeries also set the DrawAllPoints property
to
>false. This will increase speed dramatically.

sorry, but I can't find this property. I have BCB5 prof. Can you give me a
hint?

Thanks,
Thomas