Trendline

Trendline class

Represents a trendline in a chart.

Properties

NameTypeDescription
IsNameAutobooleanReturns if Microsoft Excel automatically determines the name of the trendline.
TypeintReturns the trendline type. The value of the property is TrendlineType integer constant.
NameStringReturns the name of the trendline.
OrderintReturns or sets the trendline order (an integer greater than 1) when the trendline type is Polynomial. The order must be
PeriodintReturns or sets the period for the moving-average trendline. This value should be between 2 and 255. And it must be less
ForwardfloatReturns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. The number of pe
BackwardfloatReturns 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
InterceptfloatReturns 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
CompoundTypeintSpecifies the compound line type The value of the property is MsoLineStyle integer constant.
DashTypeintSpecifies the dash line type The value of the property is MsoLineDashStyle integer constant.
CapTypeintSpecifies the ending caps. The value of the property is LineCapType integer constant.
JoinTypeintSpecifies the joining caps. The value of the property is LineJoinType integer constant.
BeginTypeintSpecifies an arrowhead for the begin of a line. The value of the property is MsoArrowheadStyle integer constant.
EndTypeintSpecifies an arrowhead for the end of a line. The value of the property is MsoArrowheadStyle integer constant.
BeginArrowLengthintSpecifies the length of the arrowhead for the begin of a line. The value of the property is MsoArrowheadLength integer c
EndArrowLengthintSpecifies the length of the arrowhead for the end of a line. The value of the property is MsoArrowheadLength integer con
BeginArrowWidthintSpecifies the width of the arrowhead for the begin of a line. The value of the property is MsoArrowheadWidth integer con
EndArrowWidthintSpecifies 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.
TransparencyfloatReturns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
StyleintRepresents the style of the line. The value of the property is LineType integer constant.
WeightintGets or sets the WeightType of the line. The value of the property is WeightType integer constant.
WeightPtfloatGets or sets the weight of the line in unit of points.
WeightPxfloatGets or sets the weight of the line in unit of pixels.
FormattingTypeintGets 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: int

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: int

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: int

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: float

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: float

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: float

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: int

Trendline.DashType property

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

Type: int

Trendline.CapType property

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

Type: int

Trendline.JoinType property

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

Type: int

Trendline.BeginType property

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

Type: int

Trendline.EndType property

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

Type: int

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: int

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: int

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: int

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: int

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: float

Trendline.Style property

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

Type: int

Trendline.Weight property

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

Type: int

Trendline.WeightPt property

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

Type: float

Trendline.WeightPx property

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

Type: float

Trendline.FormattingType property

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

Type: int

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.