ExcelScript.ChartTrendline interface

This object represents the attributes for a chart trendline object.

Methods

delete()

Delete the trendline object.

getBackwardPeriod()

Represents the number of periods that the trendline extends backward.

getFormat()

Represents the formatting of a chart trendline.

getForwardPeriod()

Represents the number of periods that the trendline extends forward.

getIntercept()

Specifies the intercept value of the trendline.

getLabel()

Represents the label of a chart trendline.

getMovingAveragePeriod()

Represents the period of a chart trendline. Only applicable to trendlines with the type MovingAverage.

getName()

Represents the name of the trendline. Can be set to a string value, a null value represents automatic values. The returned value is always a string

getPolynomialOrder()

Represents the order of a chart trendline. Only applicable to trendlines with the type Polynomial.

getShowEquation()

True if the equation for the trendline is displayed on the chart.

getShowRSquared()

True if the r-squared value for the trendline is displayed on the chart.

getType()

Represents the type of a chart trendline.

setBackwardPeriod(backwardPeriod)

Represents the number of periods that the trendline extends backward.

setForwardPeriod(forwardPeriod)

Represents the number of periods that the trendline extends forward.

setIntercept(intercept)

Specifies the intercept value of the trendline.

setMovingAveragePeriod(movingAveragePeriod)

Represents the period of a chart trendline. Only applicable to trendlines with the type MovingAverage.

setName(name)

Represents the name of the trendline. Can be set to a string value, a null value represents automatic values. The returned value is always a string

setPolynomialOrder(polynomialOrder)

Represents the order of a chart trendline. Only applicable to trendlines with the type Polynomial.

setShowEquation(showEquation)

True if the equation for the trendline is displayed on the chart.

setShowRSquared(showRSquared)

True if the r-squared value for the trendline is displayed on the chart.

setType(type)

Represents the type of a chart trendline.

Method Details

delete()

Delete the trendline object.

delete(): void;

Returns

void

getBackwardPeriod()

Represents the number of periods that the trendline extends backward.

getBackwardPeriod(): number;

Returns

number

getFormat()

Represents the formatting of a chart trendline.

getFormat(): ChartTrendlineFormat;

Returns

getForwardPeriod()

Represents the number of periods that the trendline extends forward.

getForwardPeriod(): number;

Returns

number

getIntercept()

Specifies the intercept value of the trendline.

getIntercept(): number;

Returns

number

getLabel()

Represents the label of a chart trendline.

getLabel(): ChartTrendlineLabel;

Returns

getMovingAveragePeriod()

Represents the period of a chart trendline. Only applicable to trendlines with the type MovingAverage.

getMovingAveragePeriod(): number;

Returns

number

getName()

Represents the name of the trendline. Can be set to a string value, a null value represents automatic values. The returned value is always a string

getName(): string;

Returns

string

getPolynomialOrder()

Represents the order of a chart trendline. Only applicable to trendlines with the type Polynomial.

getPolynomialOrder(): number;

Returns

number

getShowEquation()

True if the equation for the trendline is displayed on the chart.

getShowEquation(): boolean;

Returns

boolean

getShowRSquared()

True if the r-squared value for the trendline is displayed on the chart.

getShowRSquared(): boolean;

Returns

boolean

getType()

Represents the type of a chart trendline.

getType(): ChartTrendlineType;

Returns

setBackwardPeriod(backwardPeriod)

Represents the number of periods that the trendline extends backward.

setBackwardPeriod(backwardPeriod: number): void;

Parameters

backwardPeriod

number

Returns

void

setForwardPeriod(forwardPeriod)

Represents the number of periods that the trendline extends forward.

setForwardPeriod(forwardPeriod: number): void;

Parameters

forwardPeriod

number

Returns

void

setIntercept(intercept)

Specifies the intercept value of the trendline.

setIntercept(intercept: number): void;

Parameters

intercept

number

Returns

void

setMovingAveragePeriod(movingAveragePeriod)

Represents the period of a chart trendline. Only applicable to trendlines with the type MovingAverage.

setMovingAveragePeriod(movingAveragePeriod: number): void;

Parameters

movingAveragePeriod

number

Returns

void

setName(name)

Represents the name of the trendline. Can be set to a string value, a null value represents automatic values. The returned value is always a string

setName(name: string): void;

Parameters

name

string

Returns

void

setPolynomialOrder(polynomialOrder)

Represents the order of a chart trendline. Only applicable to trendlines with the type Polynomial.

setPolynomialOrder(polynomialOrder: number): void;

Parameters

polynomialOrder

number

Returns

void

setShowEquation(showEquation)

True if the equation for the trendline is displayed on the chart.

setShowEquation(showEquation: boolean): void;

Parameters

showEquation

boolean

Returns

void

setShowRSquared(showRSquared)

True if the r-squared value for the trendline is displayed on the chart.

setShowRSquared(showRSquared: boolean): void;

Parameters

showRSquared

boolean

Returns

void

setType(type)

Represents the type of a chart trendline.

setType(type: ChartTrendlineType): void;

Parameters

Returns

void