Page 1 of 1

dynamic update of ChartGrid ?

Posted: Tue Jan 06, 2009 12:42 pm
by 10545590
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

Posted: Wed Jan 07, 2009 9:06 am
by narcis
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;

Posted: Thu Jan 08, 2009 7:31 am
by 10545590
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 ...

Posted: Thu Jan 08, 2009 11:39 am
by narcis
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.