Problem with smoothing
Posted: Fri May 12, 2006 9:19 am
I had the following routine working for some time but now it produces the error message "Chart exception... circular series dependences are not allowed" . Can someone explain what has gone wrong please?
procedure TForm1.SmoothingClick(Sender: TObject);
var
Tfunctiona: TSmoothingFunction;
i: Integer;
begin
Tfunctiona:=TSmoothingFunction.create(self);
Series21.SetFunction(Tfunctiona);
Tfunctiona.Interpolate:=false;
Tfunctiona.Factor:=4;
for i:= 0 to 20 do
begin
series21.datasources.clear;
series21.datasources.add(chart.series);
Series21.CheckDataSource;
chart.series.datasources.add(series21);
chart.Series.CheckDataSource;
end;
Series21.clear;
Series21.visible:= false;
TFunctiona.free;
end;
Mike Glazer
procedure TForm1.SmoothingClick(Sender: TObject);
var
Tfunctiona: TSmoothingFunction;
i: Integer;
begin
Tfunctiona:=TSmoothingFunction.create(self);
Series21.SetFunction(Tfunctiona);
Tfunctiona.Interpolate:=false;
Tfunctiona.Factor:=4;
for i:= 0 to 20 do
begin
series21.datasources.clear;
series21.datasources.add(chart.series);
Series21.CheckDataSource;
chart.series.datasources.add(series21);
chart.Series.CheckDataSource;
end;
Series21.clear;
Series21.visible:= false;
TFunctiona.free;
end;
Mike Glazer
Code: Select all