# Trendline

Source: aspose.

Represents a trendline in a chart.

## Methods

- getBackward()
- getBeginArrowLength()
- getBeginArrowWidth()
- getBeginType()
- getCapType()
- getColor()
- getCompoundType()
- getDashType()
- getDataLabels()
- getDisplayEquation()
- getDisplayRSquared()
- getEndArrowLength()
- getEndArrowWidth()
- getEndType()
- getFormattingType()
- getForward()
- getGradientFill()
- getIntercept()
- getJoinType()
- getLegendEntry()
- getName()
- getOrder()

- getPeriod()
- getStyle()
- getThemeColor()
- getTransparency()
- getType()
- getWeight()
- getWeightPt()
- getWeightPx()
- isAuto()
- isAutomaticColor()
- isInterceptAuto()
- isNameAuto()
- isVisible()
- setAuto()
- setBackward()
- setBeginArrowLength()
- setBeginArrowWidth()
- setBeginType()
- setCapType()
- setColor()
- setCompoundType()
- setDashType()

- setDisplayEquation()
- setDisplayRSquared()
- setEndArrowLength()
- setEndArrowWidth()
- setEndType()
- setFormattingType()
- setForward()
- setIntercept()
- setInterceptAuto()
- setJoinType()
- setName()
- setNameAuto()
- setOrder()
- setPeriod()
- setStyle()
- setThemeColor()
- setTransparency()
- setVisible()
- setWeight()
- setWeightPt()
- setWeightPx()

## Methods

### getBackward()

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 and equal to zero. If the chart type is column ,the number of periods must be between 0 and 0.5

### getBeginArrowLength()

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

### getBeginArrowWidth()

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

### getBeginType()

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

### getCapType()

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

### getColor()

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

### getCompoundType()

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

### getDashType()

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

### getDataLabels()

Represents the DataLabels object for the specified ASeries.

### getDisplayEquation()

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.

### getDisplayRSquared()

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.

### getEndArrowLength()

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

### getEndArrowWidth()

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

### getEndType()

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

### getFormattingType()

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

### getForward()

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 and equal to zero.

### getGradientFill()

Represents gradient fill.

### getIntercept()

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

### getJoinType()

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

### getLegendEntry()

Gets the legend entry according to this trendline

### getName()

Returns the name of the trendline.

### getOrder()

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.

### getPeriod()

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

### getStyle()

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

### getThemeColor()

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

### getTransparency()

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

### getType()

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

### getWeight()

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

### getWeightPt()

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

### getWeightPx()

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

### isAuto()

Indicates whether this line style is auto assigned.

### isAutomaticColor()

Indicates whether the color of line is auotmatic assigned.

### isInterceptAuto()

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

### isNameAuto()

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

### isVisible()

Represents whether the line is visible.

### setAuto()

Indicates whether this line style is auto assigned.

### setBackward()

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 and equal to zero. If the chart type is column ,the number of periods must be between 0 and 0.5

### setBeginArrowLength()

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

### setBeginArrowWidth()

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

### setBeginType()

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

### setCapType()

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

### setColor()

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

### setCompoundType()

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

### setDashType()

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

### setDisplayEquation()

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.

### setDisplayRSquared()

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.

### setEndArrowLength()

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

### setEndArrowWidth()

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

### setEndType()

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

### setFormattingType()

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

### setForward()

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 and equal to zero.

### setIntercept()

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

### setInterceptAuto()

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

### setJoinType()

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

### setName()

Returns the name of the trendline.

### setNameAuto()

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

### setOrder()

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.

### setPeriod()

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

### setStyle()

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

### setThemeColor()

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

### setTransparency()

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

### setVisible()

Represents whether the line is visible.

### setWeight()

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

### setWeightPt()

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

### setWeightPx()

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