OptionalbackwardNumber of units to extend the trendline backward.
OptionaldisplayOptionaldisplayOptionalforwardNumber of units to extend the trendline forward.
OptionalinterceptFixed value where the trendline crosses the value axis. When absent, it's fitted.
OptionallabelStyle, position, and text of the R² and equation label.
Optionallayout?: ChartManualLayoutManual position of the label. When absent, the position is automatic.
Optionaltext?: ChartTextCustom label text. Replaces the generated R² and equation text.
OptionallineStyle of the trendline. By default, it's a 1.5pt dotted (sysDot) line with round caps, in
the series' automatic color.
OptionalnameName shown in the legend. When absent, the name is generated.
OptionalorderOrder of a polynomial trendline (2-6).
OptionalperiodPeriod of a moving average trendline.
The kind of trendline.
| Value | Fits |
|---|---|
linear |
A straight line. |
exponential |
An exponential curve. |
logarithmic |
A logarithmic curve. |
polynomial |
A polynomial of degree order. |
power |
A power curve. |
movingAverage |
The average of the last period points, at each point. |
A trendline fitted to a series.