Page 1 of 1

How can I refresh DBChart's serieses automatically ?

Posted: Wed Jul 11, 2007 7:53 am
by 9244052
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.

Posted: Wed Jul 11, 2007 11:15 am
by Pep
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 :

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;

thx

Posted: Thu Jul 12, 2007 4:33 am
by 9244052
ill try it thanks you