To create a linear trendline:
1) create a Polynomial trendline
2) set the RegressionValue to 1
[C#]Trendline trend = oSeries.Trendlines.CreateTrendline(Trendline.Regression.Polynomial);
trend.RegressionValue = 1;
[VB.NET]Dim trend As Trendline
trend = oSeries.Trendlines.CreateTrendline(Trendline.Regression.Polynomial)
trend.RegressionValue = 1
The linear trendline will be added to the RegressionType enumeration in a future version. |