Page 1 of 1

Smoothing Function

Posted: Fri Jun 18, 2004 2:44 pm
by 8119969
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 !

Posted: Mon Jun 21, 2004 8:48 am
by Chris
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)?

Tried code something still wrong

Posted: Mon Jun 21, 2004 5:08 pm
by 8119969
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

Posted: Mon Jun 28, 2004 1:11 pm
by Chris
Hi John,

Are you sure you're working with TeeChart for .NET version 1.1.1544.23908?

Your VB.NET code works OK here.