smoothing function
Posted: Fri Oct 21, 2005 2:40 pm
we are trying to smooth a series[profile series] and the series does not show up. Heres our code
Procedure Tform1.DrawProfile4;
VAR
profilenode:TstListNode;
min,max,mm:Integer;
Tfunctiona:Tsmoothingfunction;
BEGIN
profileseries.clear;
smoothseries.clear;
profchart.bottomaxis.setminmax(profminfld.asInteger,profmaxfld.asInteger);
Tfunctiona:=Tsmoothingfunction.create(self);
Tfunctiona.interpolate:=false;
Tfunctiona.factor:=10;
smoothseries.setfunction(Tfunctiona);
smoothseries.DataSources.add(profileseries);
smoothseries.checkdatasource;
FOR mm:=profminfld.asInteger TO profmaxfld.asInteger Do Begin
profilenode:=mylist.items[mm];
profileseries.addXY(mm,tnodetype(profilenode.data^).mono,'',clTeeColor);
end;
END;
Thanls,
Jennifer
Procedure Tform1.DrawProfile4;
VAR
profilenode:TstListNode;
min,max,mm:Integer;
Tfunctiona:Tsmoothingfunction;
BEGIN
profileseries.clear;
smoothseries.clear;
profchart.bottomaxis.setminmax(profminfld.asInteger,profmaxfld.asInteger);
Tfunctiona:=Tsmoothingfunction.create(self);
Tfunctiona.interpolate:=false;
Tfunctiona.factor:=10;
smoothseries.setfunction(Tfunctiona);
smoothseries.DataSources.add(profileseries);
smoothseries.checkdatasource;
FOR mm:=profminfld.asInteger TO profmaxfld.asInteger Do Begin
profilenode:=mylist.items[mm];
profileseries.addXY(mm,tnodetype(profilenode.data^).mono,'',clTeeColor);
end;
END;
Thanls,
Jennifer