Page 1 of 1

Listing of available Functions and their usage syntax?

Posted: Wed Mar 28, 2007 1:43 pm
by 9794096
Is there a listing of all of the data manipulation functions that are included in the .NET version of Teechart?
I have looked through the feature demo and see many of the functions displayed but not all of them. For example, I did not see the Spline function used in the feature demo and the syntax/usage of that one does not seem to work the same as the other functions.

If there is some sort of PDF I can give to our functional people that lists the functions and a description of what each does, that would really help them determine which ones we would want to implement in our application.

If something like this does not exist, then a simple explanation of the usage of the Spline function and its syntax would help me for right now.

Thanks.
Aaron Peronto

Posted: Wed Mar 28, 2007 1:58 pm
by narcis
Hi Aaron,

Spline function is only internally used by Smoothing function. There's an example of Smoothing function at All Features\Welcome !\Functions\Extended\Smoothing function in the features demo. Also, for other functions you can check Tutorial7 - Working with Functions.

Anyway, for an example of Spline's usage see one of Smoothing's function methods:

Code: Select all

		/// <summary>
		/// Gets all points from Source series, performs a function operation on points and stores results in ParentSeries.
		/// </summary>
		public override void AddPoints(Array source)
		{
			if ( ! updating )
				if ( source!=null ) 
				{
					if (source.Length>0) 
					{
						Series s=(Series)source.GetValue(0);
						Series.Clear();
						if ( s.Count>0 ) 
						{
							ValueList v=ValueList(s);
							Spline sp=new Spline();
							for (int t=0; t<s.Count; t++) 
							{
								sp.AddPoint(s.XValues.Value[t],v.Value[t]);
								sp.SetKnuckle(t,false);
							}
							sp.Interpolated=interpolate;
							sp.Fragments=s.Count*factor;

							for (int t=0; t<=sp.Fragments; t++) 
							{
								PointDouble p=sp.Value((double)t/sp.Fragments);
								//PointF p=sp.Value((double)t/sp.Fragments);
								if (Series.yMandatory) 
									Series.Add(p.X,p.Y);
								else 
									Series.Add(p.Y,p.X);
							}
						}
					}
				}
		}