Page 1 of 1

creating series in runtime .. enought using addseries

Posted: Tue May 23, 2023 9:58 am
by 16595372
Will
chart1.addseries(tfastlineseries) give me chart1.series[0]?

Re: creating series in runtime .. enought using addseries

Posted: Tue May 23, 2023 12:04 pm
by 16595372
Sorry.. see now that is declaring ownership only...

*but how to do to create series by only setting series[index]

I have 50 ID and only want to work with the series sequentially

add series 1 of tfastlineseries
add series 2..of tfastlineseries

then adding data to series by
series[0].addxy
series[1].addxy

Re: creating series in runtime .. enought using addseries

Posted: Tue May 23, 2023 12:59 pm
by yeray
Hello,

This is perfectly fine:

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
  for i:=0 to 4 do
  begin
    Chart1.AddSeries(TFastLineSeries);
    for j:=0 to 9 do
      Chart1[i].AddXY(j, random*10);
  end;
end;