I wish to set the properties such as FirstPoint, Endpoint and PolyDegree.
How do I do it.
I used the following code.
Code: Select all
tmpPointSeries1:=TPointSeries.Create(self);
AddSeries(tmpPointSeries1);
//Populate them with data (here random)
tmpPointSeries1.FillSampleValues(50);
//Add a series to be used for an CurveFitting Function
tmpLineSeries:=TLineSeries.Create(self);
AddSeries(tmpLineSeries);
//Define the Function Type for the new Series
tmpLineSeries.SetFunction(TCurveFittingFunction.Create(self));
//Define the Datasource for the new Function Series
tmpLineSeries.DataSources.Clear;
tmpLineSeries.DataSources.Add(tmpPointSeries1 );
//tmpLineSeries.FunctionType.PolyDegree := 2; gives error message