I want to add a number of series to the Datasource list of an "average" function.
neither
dbchart1.Series.DataSources := (Query1, Query2, Query 3)
nor
dbchart1.Series.DataSources.List := (Query1, Query2, Query3 )
works. I get the "a read only property can not be assigned a value" error
What is wrong?
Thxs for help,
Steffen
adding series to average function during runtime
Re: adding series to average function during runtime
Hello Steffen,
You should use the Add function as follows:
You should use the Add function as follows:
Code: Select all
uses TeeFunci, Series;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
line: TFastLineSeries;
average: TAverageTeeFunction;
begin
Chart1.View3D:=false;
for i:=0 to 5 do
begin
Chart1.AddSeries(TPointSeries).FillSampleValues();
end;
line:=Chart1.AddSeries(TFastLineSeries) as TFastLineSeries;
average:=TAverageTeeFunction.Create(self);
line.FunctionType:=average;
for i:=0 to Chart1.SeriesCount-2 do
line.DataSources.Add(Chart1[i]);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: adding series to average function during runtime
Hi Yeray,
works GREAT - thank you
Brgds.
Steffen
works GREAT - thank you
Brgds.
Steffen