TAverageTeeFunction LineSeries
Posted: Wed Nov 08, 2006 7:34 pm
I' having a problem of porting a procedure to TeeChart 7 pro (delphi2006) from a functioning enviornmet (Delphi2005, TeeChart Standard).
The following procedure will add an average TLineSeries to a chart with TLineSeries in it. If it works perfectly with Delphi2005 andTeeChart Standard, I now get the Errormessage: "No Valid DataSource: TLineSeries"
The offending line being
for i := 0 to DBChart1.SeriesCount-1 do DataSources.Add(DBChart1.Series);
Can someone explain to me what is wrong with that ?
The following procedure will add an average TLineSeries to a chart with TLineSeries in it. If it works perfectly with Delphi2005 andTeeChart Standard, I now get the Errormessage: "No Valid DataSource: TLineSeries"
Code: Select all
vCSeries := TLineSeries.Create(Self); //-------------------------------------- Average
with vCSeries do
begin
ParentChart:=DBChart1;
SetFunction(TAverageTeeFunction.Create(Self));
Title:='Average';
LinePen.Width:=2;
Stairs:=True;
Active:=true;
for i := 0 to DBChart1.SeriesCount-1 do DataSources.Add(DBChart1.Series[i]);
CheckDatasource;
end;
for i := 0 to DBChart1.SeriesCount-1 do DataSources.Add(DBChart1.Series);
Can someone explain to me what is wrong with that ?