Smoothing Problems

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
simonwood
Newbie
Newbie
Posts: 4
Joined: Mon Nov 15, 2010 12:00 am

Smoothing Problems

Post by simonwood » Fri Dec 03, 2010 10:15 am

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Smoothing Problems

Post by Sandra » Fri Dec 03, 2010 2:41 pm

Hello simon,

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

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply