ExcelScript.ChartTrendline interface
This object represents the attributes for a chart trendline object.
Methods
delete() | Delete the trendline object. |
get |
Represents the number of periods that the trendline extends backward. |
get |
Represents the formatting of a chart trendline. |
get |
Represents the number of periods that the trendline extends forward. |
get |
Specifies the intercept value of the trendline. |
get |
Represents the label of a chart trendline. |
get |
Represents the period of a chart trendline. Only applicable to trendlines with the type |
get |
Represents the name of the trendline. Can be set to a string value, a |
get |
Represents the order of a chart trendline. Only applicable to trendlines with the type |
get |
True if the equation for the trendline is displayed on the chart. |
get |
True if the r-squared value for the trendline is displayed on the chart. |
get |
Represents the type of a chart trendline. |
set |
Represents the number of periods that the trendline extends backward. |
set |
Represents the number of periods that the trendline extends forward. |
set |
Specifies the intercept value of the trendline. |
set |
Represents the period of a chart trendline. Only applicable to trendlines with the type |
set |
Represents the name of the trendline. Can be set to a string value, a |
set |
Represents the order of a chart trendline. Only applicable to trendlines with the type |
set |
True if the equation for the trendline is displayed on the chart. |
set |
True if the r-squared value for the trendline is displayed on the chart. |
set |
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
Office Scripts