i could not search proffer questions/answers.
i use TeeChart 7 - Delphi7.
i've made a MDI appl similar to monitoring tools.
children forms have 5~6 serieses and each series has TOraQuery data source.
children forms alos have a timer so serieses on child form's DBChart can be refreshed with 10 sec period.
first time, i tried to requery all series's data source using for loop. but it cause to make slow main application.
next, i changed that requerying routine to refresh DBChart itself with DBChart.refresh method.
at this time serieses refreshed with not affectting main MDI form's performance. and about an hour after, serieses dont be refreshed any more.
somebody help me please.
How can I refresh DBChart's serieses automatically ?
Hi,
I don't know how you have configured your database tables, etc.., but a way to refresh the DBChart automatically could be to use similar code to the following example :
I don't know how you have configured your database tables, etc.., but a way to refresh the DBChart automatically could be to use similar code to the following example :
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
DBChart1.AutoRefresh := false;
end;
procedure TForm1.Table1AfterPost(DataSet: TDataSet);
begin
DBChart1.RefreshData;
end;
procedure TForm1.Table1AfterOpen(DataSet: TDataSet);
begin
DBChart1.RefreshData;
end;
procedure TForm1.Table1AfterDelete(DataSet: TDataSet);
begin
DBChart1.RefreshData;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com