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
smoothing function
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jennifer,
You should use CheckDataSource method after populating source series:
You should use CheckDataSource method after populating source series:
Code: Select all
FOR mm:=profminfld.asInteger TO profmaxfld.asInteger Do Begin
profilenode:=mylist.items[mm];
profileseries.addXY(mm,tnodetype(profilenode.data^).mono,'',clTeeColor);
smoothseries.checkdatasource;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |