Problem using a TTimer to Refresh

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
stundman
Newbie
Newbie
Posts: 6
Joined: Wed Sep 14, 2005 4:00 am
Location: Lyon
Contact:

Problem using a TTimer to Refresh

Post by stundman » Mon Sep 18, 2006 12:34 pm

Hi,

I use D2005 and TeeChartPro v7.07.

I use a TTimer to Refresh 2 charts in a Form (a frame actually). In the procedure of the TTimer I have a function "RefreshData" which does a calculation and give new datas for the series. I've got 2 TFastLineSeries for one chart and 4 for the other chart, all in the same Frame.
I tried to use chart.autorepaint := False, do the calculation, chart.AutoRepaint := True and chart.Repaint, but I still have this problem. I wonder if I must do the same for the TFastLineSeries (repaint).

After a long time, I've got a message error which come from the API Graphics. The exception EOutOfRessouces raised.

I saw a topic around my problem :
http://www.teechart.net/support/viewto ... t=tcanvas
Is it possible to read the article talking about real-time plotting because the link doesn't work ? Thanks.
And thank you if you have any suggestion.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Sep 18, 2006 1:50 pm

Hi stundman,

The link doesn't work because we had to re-design our support site. Now you can find the article here:

http://www.teechart.net/reference/modul ... icle&sid=6

The article can be very helpful but to solve your problem you may need to use CheckDataSource method after doing the calculation and modifications tot the data, i.e.:

Code: Select all

  Series1.CheckDataSource;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

stundman
Newbie
Newbie
Posts: 6
Joined: Wed Sep 14, 2005 4:00 am
Location: Lyon
Contact:

Post by stundman » Mon Sep 18, 2006 4:16 pm

Hi Narcis,

Thank you for the link, it will be usefull.
I tried CheckDataSource but it doesn't work.
Can it be possible that the problem is because I use a TFrame instead of a TFrom ?
I already tried to renew my series (create after FreeAndNil every time I'm in the TTimer procedure) but it still apears. So I wonder if it happens because of the Tchart.
I didnt try the Delete method, so I'll try it later.

Any other suggestion ?

Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Sep 18, 2006 4:31 pm

Hi stundman,

Could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply