dynamic update of ChartGrid ?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
moelski
Newbie
Newbie
Posts: 92
Joined: Tue Jun 19, 2007 12:00 am
Contact:

dynamic update of ChartGrid ?

Post by moelski » Tue Jan 06, 2009 12:42 pm

Hi Support,

I used a ChartGrid to display the values of the Chart. See the sample:
Received ChartGrid.zip Content Type application/x-zip-compressed Length 10810

There is only the first value displayed in the grid even if I add more values. What´s wrong there?

Greetz Dominik

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

Post by Narcís » Wed Jan 07, 2009 9:06 am

Hi Dominik,

Implementing your example's button code like below works fine here.

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  Chart1[0].AddY(random(100));
  ChartGrid1.Series := Series1;
end;
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

moelski
Newbie
Newbie
Posts: 92
Joined: Tue Jun 19, 2007 12:00 am
Contact:

Post by moelski » Thu Jan 08, 2009 7:31 am

HI Narcis,
Implementing your example's button code like below works fine here.
Ok that works with one series. But in a common case we have several series like this:

Code: Select all

  Chart1[0].AddY(random(100));
  Chart1[1].AddY(random(100));
  Chart1[2].AddY(random(100));
  Chart1[3].AddY(random(100));
  Chart1[4].AddY(random(100));

  ChartGrid1.Series := Chart1[0];
And now I see only the first Series in the Grid. And what I need is to see all series in the grid ...

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

Post by Narcís » Thu Jan 08, 2009 11:39 am

Hi Dominik,

Ok, I found that reassigning TChartGrid's Chart updates it:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  Chart1[0].AddY(random(100));
  Chart1[1].AddY(random(100));
  Chart1[2].AddY(random(100));
  Chart1[3].AddY(random(100));
  Chart1[4].AddY(random(100));

  ChartGrid1.Chart := Chart1;
end;
Anyway, I've added the issue to the list (TV52013694) to be investigated.
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