Represents a [[Series]] trendline.

Trendline

new Trendline(a: TrendlineCollection): Trendline

Returns Trendline

Specifies the number of periods or units by which the trendline extends backward.

get backward(): number

Returns number

set backward(a: number): void

Parameters

  • a: number

Returns void

Inherited from: ChartObject

Returns the owning chart (read-only)

get chart(): WorksheetChart

Returns WorksheetChart

Specifies the number of periods or units by which the trendline extends forward.

get forward(): number

Returns number

set forward(a: number): void

Parameters

  • a: number

Returns void

Specifies the value axis intercept for the trendline.

get intercept(): number | null

Returns number | null

set intercept(a: number | null): void

Parameters

  • a: number | null

Returns void

Returns or sets a [[TrendlineLabel]] instance which determines the text and appearance of the trendline label.

get label(): TrendlineLabel

Returns TrendlineLabel

set label(a: TrendlineLabel): void

Parameters

Returns void

Returns a [[legendEntry]] instance which determines the appearance of this trendline's appearance in the [[WorksheetChart.legend]].

get legendEntry(): LegendEntry

Returns LegendEntry

set legendEntry(a: LegendEntry): void

Parameters

Returns void

Returns or sets a [[TrendlineLine]] instance which controls the color and width of the trendline.

get line(): TrendlineLine

Returns TrendlineLine

set line(a: TrendlineLine): void

Parameters

Returns void

Specifies the name of the trendline.

get name(): string

Returns string

set name(a: string): void

Parameters

  • a: string

Returns void

Specifies the order/degree of the polynomial function which defines the trendline. Applicable only when the [[trendlineType]] property is set to Polynomial.

get order(): TrendlinePolynomialOrder

Returns TrendlinePolynomialOrder

set order(a: TrendlinePolynomialOrder): void

Parameters

Returns void

Inherited from: ChartObject

returns this object's owner. (read-only) The owner or null if this object is owned directly by the Chart

get owner(): ChartObject

Returns ChartObject

Specifies the period for a moving-average trendline. Applicable only when the [[trendlineType]] property is set to MovingAverage.

get period(): number

Returns number

set period(a: number): void

Parameters

  • a: number

Returns void

Inherited from: ChartObject

The owning sheet (read-only)

get sheet(): Sheet

Returns Sheet

Specifies the type of trendline, i.e., linear, exponential, polynomial, etc.

get trendlineType(): TrendlineType

Returns TrendlineType

set trendlineType(a: TrendlineType): void

Parameters

Returns void

Inherited from: ChartObject

The owning workbook (read-only)

get workbook(): Workbook

Returns Workbook

Inherited from: ChartObject

The owning worksheet (read-only)

get worksheet(): Worksheet

Returns Worksheet