Page 1 of 1

changing a series type in run time.

Posted: Fri Dec 05, 2003 5:55 am
by 8440512
How to change a series type in the runtime.
I have created line series in the design time, I want to change it to Bar series or Area series or pieseries or pointseries during runtime. Just the way it is done th Tchartoffice demo.
Similarly how can I change the function type in runtime.
I don't want to create multiple series, but need to change the existing series.
What is the solution.

Posted: Fri Dec 05, 2003 10:13 am
by Pep
You can change the Series type in similar manner to the following (this will change to TBarSeries) :

Code: Select all

var tmp: TChartSeries; 
begin 
  tmp := Chart1.Series[0]; 
  ChangeSeriesType(tmp,TBarSeries); 
end;
Josep Lluis Jorge
http://support.steema.com