I have a series of data with 7 points. I create a second series and set the function to an instance smoothing and point to the first series as data source. I have tried interpolate = true, recalculate, and varying the factor. The resulting plot is has periodic downward spikes.
Does anyone know what I am doing wrong.
Thanks !
Smoothing Function
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi ..
Maybe the problem is related to your dataset? Could you be so kind as to modify the above code snippet so I can reproduce your problem here? Are you working with the latest TeeChart for .NET version (available from the customer download area)?
The following code seems to work OK here:I have a series of data with 7 points. I create a second series and set the function to an instance smoothing and point to the first series as data source. I have tried interpolate = true, recalculate, and varying the factor. The resulting plot is has periodic downward spikes.
Code: Select all
private void Form1_Load(object sender, System.EventArgs e) {
commander1.Chart = tChart1;
Steema.TeeChart.Styles.Points points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Steema.TeeChart.Functions.Smoothing smoothing1 = new Steema.TeeChart.Functions.Smoothing(tChart1.Chart);
points1.FillSampleValues(7);
smoothing1.Interpolate = true;
smoothing1.Factor = 20;
line1.Function = smoothing1;
line1.DataSource = points1;
line1.CheckDataSource();
}
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Tried code something still wrong
I must have missed something because I am still getting the spikes. The only setting I changed from the default was to set 3D off.
???
John
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oseries1 As Steema.TeeChart.Styles.Points
Dim oseries2 As Steema.TeeChart.Styles.Line
Dim ofunction As Steema.TeeChart.Functions.Smoothing
oseries1 = New Steema.TeeChart.Styles.Points(TChart1.Chart)
oseries2 = New Steema.TeeChart.Styles.Line(TChart1.Chart)
ofunction = New Steema.TeeChart.Functions.Smoothing(TChart1.Chart)
oseries1.FillSampleValues(7)
ofunction.Interpolate = True
ofunction.Factor = 20
oseries2.Function = ofunction
oseries2.DataSource = oseries1
oseries2.CheckDataSource()
End Sub
???
John
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oseries1 As Steema.TeeChart.Styles.Points
Dim oseries2 As Steema.TeeChart.Styles.Line
Dim ofunction As Steema.TeeChart.Functions.Smoothing
oseries1 = New Steema.TeeChart.Styles.Points(TChart1.Chart)
oseries2 = New Steema.TeeChart.Styles.Line(TChart1.Chart)
ofunction = New Steema.TeeChart.Functions.Smoothing(TChart1.Chart)
oseries1.FillSampleValues(7)
ofunction.Interpolate = True
ofunction.Factor = 20
oseries2.Function = ofunction
oseries2.DataSource = oseries1
oseries2.CheckDataSource()
End Sub
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi John,
Are you sure you're working with TeeChart for .NET version 1.1.1544.23908?
Your VB.NET code works OK here.
Are you sure you're working with TeeChart for .NET version 1.1.1544.23908?
Your VB.NET code works OK here.
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/