Trendline Interface

Definition

Represents a trendline in a chart.

public interface class Trendline
[System.Runtime.InteropServices.Guid("91C46192-3124-4346-A815-10B8873F5A06")]
public interface Trendline
type Trendline = interface
Public Interface Trendline
Attributes

Examples

Use Trendlines (Index), where Index is the trendline index number, to return a single Trendline object.

The index number denotes the order in which the trendlines were added to the series. Trendlines(1) is the first trendline added to the series, and Trendlines(Trendlines.Count) is the last one added.

The following example changes the trendline type for the first series of the first chart in the active document. If the series has no trendline, this example will fail.

Remarks

A trendline shows the trend, or direction, of data in a series. The Trendline object is a member of the Trendlines collection. The Trendlines collection contains all the Trendline objects for a single series.

Properties

Application

When used without an object qualifier, this property returns an _Application object that represents the Microsoft Word application. When used with an object qualifier, this property returns an Application object that represents the creator of the specified object (you can use this property with an OLE Automation object to return the application of that object). Read-only.

Backward

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends backward.

Backward2

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends backward. Read/write Double.

Border

Returns a ChartBorder object that represents the border of the object. Read-only.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Integer.

DataLabel

Returns a DataLabel object that represents the data label associated with the trendline. Read-only.

DisplayEquation

True if the equation for the trendline is displayed on the chart (in the same data label as the R-squared value). Setting this property to True automatically turns on data labels. Read/write Boolean.

DisplayRSquared

True if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation). Setting this property to True automatically turns on data labels. Read/write Boolean.

Format

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Forward

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends forward.

Forward2

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. Read/write Double.

Index

Returns the index number of the object within the collection of similar objects.

Intercept

Returns or sets the point where the trendline crosses the value axis. Read/write Double.

InterceptIsAuto

True if the point where the trendline crosses the value axis is automatically determined by the regression. Read/write Boolean.

Name

Returns or sets a String value that represents the name of the object.

NameIsAuto

True if Microsoft Word automatically determines the name of the trendline. Read/write Boolean.

Order

Returns or sets a Integer value that represents the trendline order (an integer greater than 1) when the trendline’s Type is xlPolynomial.

Parent

Returns the parent for the specified object. Read-only Object.

Period

Returns or sets the period for the moving-average trendline. Can be a value from 2 through 255. Read/write Integer.

Type

Returns or sets a XlTrendlineType value that represents the trendline type.

Methods

ClearFormats()

Clears the formatting of the object.

Delete()

Deletes the object.

Select()

Selects the object.

Applies to