Page 1 of 1

Problem using a TTimer to Refresh

Posted: Mon Sep 18, 2006 12:34 pm
by 9343299
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.

Posted: Mon Sep 18, 2006 1:50 pm
by narcis
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;

Posted: Mon Sep 18, 2006 4:16 pm
by 9343299
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.

Posted: Mon Sep 18, 2006 4:31 pm
by narcis
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.