Smoothing Function

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
John Lott
Newbie
Newbie
Posts: 14
Joined: Tue Apr 08, 2003 4:00 am

Smoothing Function

Post by John Lott » Fri Jun 18, 2004 2:44 pm

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 !

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Jun 21, 2004 8:48 am

Hi ..
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.
The following code seems to work OK here:

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();

}
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)?
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/

John Lott
Newbie
Newbie
Posts: 14
Joined: Tue Apr 08, 2003 4:00 am

Tried code something still wrong

Post by John Lott » Mon Jun 21, 2004 5:08 pm

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

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Jun 28, 2004 1:11 pm

Hi John,

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/

Post Reply