Page 1 of 1

Smoothing Problems

Posted: Fri Dec 03, 2010 10:15 am
by 16457861
Hi, I'm a bit of a newbie with TeeChart so please bear with me.

I have a chart which is based on a DBCrossTab and is set up so that the chart is grouped by financial year. So at runtime I get several series appearing on the chart depending on how many financial years are spanned by the data in the DBCrossTab.

I want to smooth these series and hide the non-smoothed series so I have attempted to do the following:-

var
New_Series: TLineSeries;
TFunction: TSmoothingFunction;
begin
New_Series := TLineSeries.Create(Self);
DBChart1.AddSeries(New_Series);

with New_Series do
begin
DataSources.Add(Series);
TFunction := TSmoothingFunction.Create(Self);
SetFunction(TFunction);
TFunction.Interpolate := True;
TFunction.Factor := 8;
CheckDatasource;
Series.Visible := False;
end;

This all works fine provided that I only have 1 financial year displayed on my chart (i.e. 1 series) but if I have more than 1 series I get the following error message:-
"Project Chart_Test raised exception class EConvertError with message "" is not a valid integer value"

Can anyone give me some idea what I may be doing wrong, or suggest a better approach
Thanks
Simon

Re: Smoothing Problems

Posted: Fri Dec 03, 2010 2:41 pm
by 10050769
Hello simon,

Could you please send us a simple project so we can reproduce exactly your problem here?

Thanks,