Page 1 of 1

problems with spline smoothing

Posted: Thu Feb 21, 2008 1:20 pm
by 9524558
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

Posted: Thu Feb 21, 2008 2:19 pm
by narcis
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.

Posted: Thu Feb 21, 2008 5:04 pm
by 9524558
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