creating series in runtime .. enought using addseries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mathsbertil
Newbie
Newbie
Posts: 14
Joined: Mon Feb 27, 2023 12:00 am

creating series in runtime .. enought using addseries

Post by mathsbertil » Tue May 23, 2023 9:58 am

Will
chart1.addseries(tfastlineseries) give me chart1.series[0]?

mathsbertil
Newbie
Newbie
Posts: 14
Joined: Mon Feb 27, 2023 12:00 am

Re: creating series in runtime .. enought using addseries

Post by mathsbertil » Tue May 23, 2023 12:04 pm

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

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: creating series in runtime .. enought using addseries

Post by Yeray » Tue May 23, 2023 12:59 pm

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;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply