problems with spline smoothing

TeeChart for ActiveX, COM and ASP
Post Reply
Andras
Newbie
Newbie
Posts: 40
Joined: Thu Oct 14, 2004 4:00 am
Location: Hungary

problems with spline smoothing

Post by Andras » Thu Feb 21, 2008 1:20 pm

Dear Support

I wanted to use spline smoothing, but I face a problem. The code is very simple (VB6).:

.TChartMBPressure.Series(3).DataSource = .TChartMBPressure.Series(0)
.TChartMBPressure.Series(3).CheckDataSource
.TChartMBPressure.Series(3).FunctionType.asSmoothing.FACTOR = 4

In other words Series(0) (a point series) is filled up with some point values, and I would like to do a spline smoothing to them with the help of Series(3) (a line series). Upon issuing the 3rd. line however I get the error message:

Run-time error '-2147418113 (8000ffff)'

Method 'Factor' of object ISmoothingFunction' failed

What can be the problem? I tried to do this in tha same way, as described in the tutorial, or demo under All Fetures/Functions/Extended/Smoothing Spline

Tx in advance, best regards

Andras

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Feb 21, 2008 2:19 pm

Hi Andras,

I'm not able to reproduce the problem here using TeeChart Pro v8.0.0.3 ActiveX,latest version available at the client area, and the code below. Could you please modify the code below or send us a simple example project we can run "as-is" to reproduce the problem here and also let us know the TeeChart version you are using?

Code: Select all

Private Sub Form_Load()
    With TChart1
        .Aspect.View3D = False
        .AddSeries scPoint
        
        For i = 0 To 100
            .Series(0).Add Rnd(), "", clTeeColor
        Next
        
        .AddSeries scLine
        .Series(1).SetFunction tfSmoothing
        .Series(1).FunctionType.asSmoothing.Factor = 4
        .Series(1).DataSource = TChart1.Series(0)
    End With
End Sub
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / 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

Andras
Newbie
Newbie
Posts: 40
Joined: Thu Oct 14, 2004 4:00 am
Location: Hungary

Post by Andras » Thu Feb 21, 2008 5:04 pm

Dear Narcís

Tx for the quick answer. The problem was:

.Series(1).SetFunction tfSmoothing

was missing. Now it works fine. Thank you again for your kind help.

best regards

Andras

Post Reply