I'd like to specify at runtime the smoothing of a set of points. If I place the tee chart component with no series into a form at design time the follwoing code does not work when it comes to smoothing. Run time error '-2147418113 (8000ffff)' Method 'Interpolate' of object 'ISmoothingFunction' failed.
Private Sub Form_Load()
With TChart1
.RemoveAllSeries
.Aspect.View3D = False
.AddSeries scLine
With .Series(0)
.Name = "line1"
.FillSampleValues 25
.asLine.Pointer.Visible = True
End With
.AddSeries scLine
With TChart1.Series(1)
.DataSource = "line1"
.FunctionType.asSmoothing.Interpolate = False
.FunctionType.asSmoothing.Factor = 4
End With
End With
End Sub
I don't want to specify anything at design time and want to do this all at runtime. Using TeeChart Pro v6.0.0.5
Thanks
Smoothing lines at runtime
Hi,
you should set the function type before to assign a factor :
you should set the function type before to assign a factor :
Code: Select all
With TChart1.Series(1)
.SetFunction tfSmoothing
.DataSource = TChart1.Series(0)
Pep Jorge
http://support.steema.com
http://support.steema.com