共用方式為


Trendline Members (Excel)

Represents a trendline in a chart.

Methods

Name

Description

ClearFormats

Clears the formatting of the object.

Delete

Deletes the object.

Select

Selects the object.

Properties

Name

Description

Application

When used without an object qualifier, this property returns an Application object that represents the Microsoft Excel 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.

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 Border object that represents the border of the object.

Creator

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

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 ChartFormat object. Read-only.

Forward2

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

Index

Returns a Long value that represents 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 representing the name of the object.

NameIsAuto

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

Order

Returns or sets a Long value that represents the trendline order (an integer greater than 1) when the trendline type is xlPolynomial.

Parent

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

Period

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

Type

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