Trendline Object
Description
Represents a trendline in the specified chart. A trendline shows the trend, or direction, of data in a series. The Trendline object is a member of the Trendlines collection, which contains all the Trendline objects for a single series.
Using the Trendline Object
Use Trendlines(index), where index is the trendline's index number, to return a single Trendline object. The following example changes the trendline type for series one in the chart. If the series has no trendline, this example will fail.
myChart.SeriesCollection(1).Trendlines(1).Type = xlMovingAvg
The index number denotes the order in which the trendlines are added to the series. Trendlines(1) is the first trendline added to the series, and Trendlines(Trendlines.Count) is the last one added.
Properties
Application property, Backward property, Border property, Creator property, DataLabel property, DisplayEquation property, DisplayRSquared property, Forward property, Index property, Intercept property, InterceptIsAuto property, Name property, NameIsAuto property, Order property, Parent property, Period property, Type property.
Methods
ClearFormats method, Delete method.