Trendline

Trendline class

Represents a trendline in a chart.

Properties

NameTypeDescription
IsNameAutobooleanReturns if Microsoft Excel automatically determines the name of the trendline.
TypeNumberReturns the trendline type. The value of the property is TrendlineType integer constant.
NameStringReturns the name of the trendline.
OrderNumberReturns or sets the trendline order (an integer greater than 1) when the trendline type is Polynomial. The order must be
PeriodNumberReturns or sets the period for the moving-average trendline. This value should be between 2 and 255. And it must be less
ForwardNumberReturns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. The number of pe
BackwardNumberReturns or sets the number of periods (or units on a scatter chart) that the trendline extends backward. The number of p
DisplayEquationbooleanRepresents if the equation for the trendline is displayed on the chart (in the same data label as the R-squared value).
DisplayRSquaredbooleanRepresents if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation). S
InterceptNumberReturns or sets the point where the trendline crosses the value axis.
DataLabelsDataLabelsRepresents the DataLabels object for the specified series.
LegendEntryLegendEntryGets the legend entry according to this trendline
CompoundTypeNumberSpecifies the compound line type The value of the property is MsoLineStyle integer constant.
DashTypeNumberSpecifies the dash line type The value of the property is MsoLineDashStyle integer constant.
CapTypeNumberSpecifies the ending caps. The value of the property is LineCapType integer constant.
JoinTypeNumberSpecifies the joining caps. The value of the property is LineJoinType integer constant.
BeginTypeNumberSpecifies an arrowhead for the begin of a line. The value of the property is MsoArrowheadStyle integer constant.
EndTypeNumberSpecifies an arrowhead for the end of a line. The value of the property is MsoArrowheadStyle integer constant.
BeginArrowLengthNumberSpecifies the length of the arrowhead for the begin of a line. The value of the property is MsoArrowheadLength integer c
EndArrowLengthNumberSpecifies the length of the arrowhead for the end of a line. The value of the property is MsoArrowheadLength integer con
BeginArrowWidthNumberSpecifies the width of the arrowhead for the begin of a line. The value of the property is MsoArrowheadWidth integer con
EndArrowWidthNumberSpecifies the width of the arrowhead for the end of a line. The value of the property is MsoArrowheadWidth integer const
ThemeColorThemeColorGets and sets the theme color. If the foreground color is not a theme color, NULL will be returned.
ColorColorRepresents the com.aspose.cells.Color of the line.
TransparencyNumberReturns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
StyleNumberRepresents the style of the line. The value of the property is LineType integer constant.
WeightNumberGets or sets the WeightType of the line. The value of the property is WeightType integer constant.
WeightPtNumberGets or sets the weight of the line in unit of points.
WeightPxNumberGets or sets the weight of the line in unit of pixels.
FormattingTypeNumberGets or sets format type. The value of the property is ChartLineFormattingType integer constant.
IsAutomaticColorbooleanIndicates whether the color of line is automatic assigned.
IsVisiblebooleanRepresents whether the line is visible.
IsAutobooleanIndicates whether this line style is auto assigned.
GradientFillGradientFillRepresents gradient fill.

Methods

NameDescription
isInterceptAutoIndicates whether Microsoft Workbook automatically determines the intercept of the trendline.
setInterceptAutoSets whether Microsoft Workbook automatically determines the intercept of the trendline.

Trendline.IsNameAuto property

Returns if Microsoft Excel automatically determines the name of the trendline.

Type: boolean

Trendline.Type property

Returns the trendline type. The value of the property is TrendlineType integer constant.

Type: Number

Trendline.Name property

Returns the name of the trendline.

Type: String

Trendline.Order property

Returns or sets the trendline order (an integer greater than 1) when the trendline type is Polynomial. The order must be between 2 and 6.

Type: Number

Trendline.Period property

Returns or sets the period for the moving-average trendline. This value should be between 2 and 255. And it must be less than the number of the chart points in the series

Type: Number

Trendline.Forward property

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. The number of periods must be greater than or equal to zero.

Type: Number

Trendline.Backward property

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends backward. The number of periods must be greater than or equal to zero. If the chart type is column ,the number of periods must be between 0 and 0.5

Type: Number

Trendline.DisplayEquation property

Represents 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.

Type: boolean

Trendline.DisplayRSquared property

Represents 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.

Type: boolean

Trendline.Intercept property

Returns or sets the point where the trendline crosses the value axis.

Type: Number

Trendline.DataLabels property

Represents the DataLabels object for the specified series.

Type: DataLabels

Trendline.LegendEntry property

Gets the legend entry according to this trendline

Type: LegendEntry

Trendline.CompoundType property

Specifies the compound line type The value of the property is MsoLineStyle integer constant.

Type: Number

Trendline.DashType property

Specifies the dash line type The value of the property is MsoLineDashStyle integer constant.

Type: Number

Trendline.CapType property

Specifies the ending caps. The value of the property is LineCapType integer constant.

Type: Number

Trendline.JoinType property

Specifies the joining caps. The value of the property is LineJoinType integer constant.

Type: Number

Trendline.BeginType property

Specifies an arrowhead for the begin of a line. The value of the property is MsoArrowheadStyle integer constant.

Type: Number

Trendline.EndType property

Specifies an arrowhead for the end of a line. The value of the property is MsoArrowheadStyle integer constant.

Type: Number

Trendline.BeginArrowLength property

Specifies the length of the arrowhead for the begin of a line. The value of the property is MsoArrowheadLength integer constant.

Type: Number

Trendline.EndArrowLength property

Specifies the length of the arrowhead for the end of a line. The value of the property is MsoArrowheadLength integer constant.

Type: Number

Trendline.BeginArrowWidth property

Specifies the width of the arrowhead for the begin of a line. The value of the property is MsoArrowheadWidth integer constant.

Type: Number

Trendline.EndArrowWidth property

Specifies the width of the arrowhead for the end of a line. The value of the property is MsoArrowheadWidth integer constant.

Type: Number

Trendline.ThemeColor property

Gets and sets the theme color. If the foreground color is not a theme color, NULL will be returned.

Type: ThemeColor

Trendline.Color property

Represents the com.aspose.cells.Color of the line.

Type: Color

Trendline.Transparency property

Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).

Type: Number

Trendline.Style property

Represents the style of the line. The value of the property is LineType integer constant.

Type: Number

Trendline.Weight property

Gets or sets the WeightType of the line. The value of the property is WeightType integer constant.

Type: Number

Trendline.WeightPt property

Gets or sets the weight of the line in unit of points.

Type: Number

Trendline.WeightPx property

Gets or sets the weight of the line in unit of pixels.

Type: Number

Trendline.FormattingType property

Gets or sets format type. The value of the property is ChartLineFormattingType integer constant.

Type: Number

Trendline.IsAutomaticColor property

Indicates whether the color of line is automatic assigned.

Type: boolean

Trendline.IsVisible property

Represents whether the line is visible.

Type: boolean

Trendline.IsAuto property

Indicates whether this line style is auto assigned.

Type: boolean

Trendline.GradientFill property

Represents gradient fill.

Type: GradientFill

isInterceptAuto()

Indicates whether Microsoft Workbook automatically determines the intercept of the trendline.

setInterceptAuto(isInterceptAuto)

Sets whether Microsoft Workbook automatically determines the intercept of the trendline.