Optional ReadonlyequationShows the trendline's equation on the chart, such as "y = 2.5x + 4". Default is false. Not for moving averages
Optional ReadonlyforecastExtends the trendline before the first point by this many categories, or on a scatter or bubble chart, this much along the x axis. Default is 0. Not for moving averages
Optional ReadonlyforecastExtends the trendline past the last point by this many categories, or on a scatter or bubble chart, this much along the x axis. Default is 0. Not for moving averages
Optional ReadonlyinterceptWhere the trendline crosses the vertical axis: its value where x is 0. Default is where the values put it. Only for linear, exponential and polynomial trendlines, and above 0 for exponential ones
Optional ReadonlylabelThe equation's and R² value's number format and font
Optional ReadonlylineThe line's colour, width and dashes. Default is the series' colour, 1.5 points wide, with short dots
Optional ReadonlynameThe trendline's name in the legend. Default is Office's, such as "Linear (Sales)"
Optional ReadonlyorderThe order of a polynomial trendline, from 2 to 6: 2 has one bend, 3 has two, and so on. Default is 2
Optional ReadonlyperiodHow many points each point of a moving average averages, from 2 to one fewer than the series' values or points. Default is 2
Optional ReadonlyrShows how well the trendline fits the values, its R² value, on the chart. Default is false. Not for moving averages
ReadonlytypeThe kind of line fitted to the values
A trendline: a line fitted to a series' values, which shows their trend, and can extend it forward or backward as a forecast. It is drawn as a dotted line in the series' colour, and has an entry in the legend.
Public Api