Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

Sets or returns the type of regression used to construct this trendline.

Signature
C#
C#

 public Regression RegressionType{ get; set; }
Signature
vb.net
vb.net

Public Property RegressionType() As Regression
Remarks

This object will return a Trendline.Regression value specifying what sort of equation is used to calculate the trendline. Note that linear trendlines have a RegressionType of Polynomial, with a Trendline.RegressionValue of 1.

After modifying this property, the Trendline.RegressionValue property may be adjusted to ensure it is within the valid range for the new regression type. If the current RegressionValue is larger than the new regression type allows, it will be set to the largest value allowed for the new type. Similarly, if the current RegressionValue is smaller than the new regression type allows, it will be set to the smallest value allowed. For example, if the RegressionValue is 13, and you change the regression type to Polynomial, the RegressionValue will be changed to 6 - the maximum value Excel allows for Polynomial regressions.