I want to add and remove series to and from a Tchart. I suppose that AddSeries can be used for adding series. But for removing the series, there is very few information in the user's guide. Could you provide some examples about adding and deleting series from a Chart ?
Thank you in advance.
Patrick
How to add and remote a FastLineSeries in runtime ?
-
- Newbie
- Posts: 20
- Joined: Tue Jul 03, 2007 12:00 am
- Contact:
Hi Patrick,
You could use the series' variable to remove it from the chart:
Or you could remove it using the series' index in the series list:
You could use the series' variable to remove it from the chart:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var line1: TLineSeries;
point1: TPointSeries;
begin
line1 := TLineSeries.Create(nil);
point1 := TPointSeries.Create(nil);
Chart1.AddSeries(line1);
Chart1.AddSeries(point1);
line1.FillSampleValues(25);
point1.FillSampleValues(25);
Chart1.RemoveSeries(point1);
point1.Free;
end;
Or you could remove it using the series' index in the series list:
Code: Select all
Chart1.RemoveSeries(1);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 20
- Joined: Tue Jul 03, 2007 12:00 am
- Contact:
Thank you
Many thanks for the help. This works quite well.
Re: How to add and remote a FastLineSeries in runtime ?
Hi Patrick,
I've split your new post into a new thread:
http://www.teechart.net/support/viewtop ... =3&t=15208
I've split your new post into a new thread:
http://www.teechart.net/support/viewtop ... =3&t=15208
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |