smoothing function
Posted: Thu Jan 27, 2005 5:30 am
we made up a very simple program to use the smoothing function
which has a method called draw. when we "draw", we get a memory
access error at the setfunction line. The two series[Series1,2] are added in the chart editor. code is below: It compiles fine
***************************************************
Procedure Tform1.draw;
var
Tfunctiona:TsmoothingFunction;
Begin
series1.addXY(1,0,'',clTeeColor);
series1.addXY(2,2.5,'',clTeeColor);
series1.addXY(3,-1.6,'',clTeeColor);
series1.addXY(4,-0.5,'',clTeeColor);
series1.addXY(5,1.3,'',clTeeColor);
series1.addXY(6,1.5,'',clTeeColor);
series1.addXY(7,1.4,'',clTeeColor);
series1.addXY(8,-1.75,'',clTeeColor);
series1.addXY(9,-1.25,'',clTeeColor);
series1.addXY(10,1.3,'',clTeeColor);
series2.setfunction(Tfunctiona.create(self));
Tfunctiona.Interpolate:=true;
Tfunctiona.Factor:=4;
series2.datasources.clear;
series2.datasources.add(series1);
end;
************************************************************
Thanks,
Natalie
which has a method called draw. when we "draw", we get a memory
access error at the setfunction line. The two series[Series1,2] are added in the chart editor. code is below: It compiles fine
***************************************************
Procedure Tform1.draw;
var
Tfunctiona:TsmoothingFunction;
Begin
series1.addXY(1,0,'',clTeeColor);
series1.addXY(2,2.5,'',clTeeColor);
series1.addXY(3,-1.6,'',clTeeColor);
series1.addXY(4,-0.5,'',clTeeColor);
series1.addXY(5,1.3,'',clTeeColor);
series1.addXY(6,1.5,'',clTeeColor);
series1.addXY(7,1.4,'',clTeeColor);
series1.addXY(8,-1.75,'',clTeeColor);
series1.addXY(9,-1.25,'',clTeeColor);
series1.addXY(10,1.3,'',clTeeColor);
series2.setfunction(Tfunctiona.create(self));
Tfunctiona.Interpolate:=true;
Tfunctiona.Factor:=4;
series2.datasources.clear;
series2.datasources.add(series1);
end;
************************************************************
Thanks,
Natalie