Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class Trendline

java.lang.Object
  extended by com.aspose.cells.Trendline

public class Trendline
extends java.lang.Object

Represents a trendline in a chart.


Method Summary
 boolean displayEquation()
          Indicates whether the R-squared value of the trendline is displayed on the chart (in the same data label as the equation).
 boolean displayRSquared()
          Indicates whether the equation for the trendline is displayed on the chart (in the same data label as the R-squared value).
 double getBackward()
          Gets the number of periods (or units on a scatter chart) that the trendline extends backward.
 DataLabels getDataLabels()
          Gets the DataLabels object for Trendline
 double getForward()
          Gets the number of periods (or units on a scatter chart) that the trendline extends forward.
 double getIntercept()
          Gets the point where the trendline crosses the value axis.
 Line getLine()
          Gets the line or border of Trendlines object.
 java.lang.String getName()
          Gets the name of the trendline.
 int getOrder()
          Gets the trendline order (between 2 and 6) when the trendline type is Polynomial.
 int getPeriod()
          Gets the period for the moving-average trendline.
 int getType()
          Gets the trendline type
 boolean isInterceptAuto()
          Indicates whether Microsoft Workbook automatically determines the intercept of the trendline.
 boolean isNameAuto()
          Indicats whether Microsoft Workbook automatically determines the name of the trendline.
 void setBackward(double backward)
          Sets the number of periods (or units on a scatter chart) that the trendline extends backward.
 void setDisplayEquation(boolean displayEquation)
          Sets whether the R-squared value of the trendline is displayed on the chart (in the same data label as the equation).
 void setDisplayRSquared(boolean displayRSquared)
          Sets whether the equation for the trendline is displayed on the chart (in the same data label as the R-squared value).
 void setForward(double forward)
          Sets the number of periods (or units on a scatter chart) that the trendline extends forward.
 void setIntercept(double intercept)
          Sets the point where the trendline crosses the value axis.
 void setInterceptAuto(boolean setIntercept)
          Sets whether Microsoft Workbook automatically determines the intercept of the trendline.
 void setLine(Line line)
          Sets the line or border of Trendlines object.
 void setName(java.lang.String name)
          Sets the name of the trendline.
 void setNameAuto(boolean isNameAuto)
          Sets whether Microsoft Workbook automatically determines the name of the trendline.
 void setOrder(int order)
          Sets the trendline order (between 2 and 6) when the trendline type is Polynomial.
 void setPeriod(int period)
          Sets the period for the moving-average trendline.It must be between 2 and 255.
 void setType(int type)
          Sets the trendline type
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public int getType()
Gets the trendline type

Returns:
trendline type

setType

public void setType(int type)
Sets the trendline type

Parameters:
type - trendline type.
See Also:
TrendlineType

getBackward

public double getBackward()
Gets the number of periods (or units on a scatter chart) that the trendline extends backward.

Returns:
the number of periods.
Throws:
CellsException - if Trendlines object has bean removed.

setBackward

public void setBackward(double backward)
Sets the number of periods (or units on a scatter chart) that the trendline extends backward.

Parameters:
backward - the number of periods
Throws:
CellsException - if Trendlines object has bean removed.

getForward

public double getForward()
Gets the number of periods (or units on a scatter chart) that the trendline extends forward.

Returns:
the number of periods
Throws:
CellsException - if Trendlines object has bean removed.

setForward

public void setForward(double forward)
Sets the number of periods (or units on a scatter chart) that the trendline extends forward.

Parameters:
forward - the number of periods
Throws:
CellsException - if Trendlines object has bean removed.

getLine

public Line getLine()
Gets the line or border of Trendlines object.

Returns:
the line or border of Trendlines object.
Throws:
CellsException - if Trendlines object has bean removed.

setLine

public void setLine(Line line)
Sets the line or border of Trendlines object.

Parameters:
line - the line or border of Trendlines object.
Throws:
CellsException - if Trendlines object has bean removed.

setName

public void setName(java.lang.String name)
Sets the name of the trendline.

Parameters:
name - the name of the trendline.
Throws:
CellsException - if Trendlines object has bean removed.

getName

public java.lang.String getName()
Gets the name of the trendline.

Returns:
the name of the trendline.
Throws:
CellsException - if Trendlines object has bean removed.

getOrder

public int getOrder()
Gets the trendline order (between 2 and 6) when the trendline type is Polynomial.

Returns:
the trendline order.
Throws:
CellsException - if Trendlines object has bean removed.

setOrder

public void setOrder(int order)
Sets the trendline order (between 2 and 6) when the trendline type is Polynomial.

Parameters:
order - the trendline order.
Throws:
java.lang.IllegalArgumentException - if trendline order is not between 2 and 6.
CellsException - if Trendlines object has bean removed.

getPeriod

public int getPeriod()
Gets the period for the moving-average trendline.

Returns:
the period for the moving-average trendline.
Throws:
CellsException - if Trendlines object has bean removed.

setPeriod

public void setPeriod(int period)
Sets the period for the moving-average trendline.It must be between 2 and 255.

Parameters:
period - the period for the moving-average trendline.
Throws:
java.lang.IllegalArgumentException - if trendline order is not between 2 and 255.
CellsException - if Trendlines object has bean removed.

setIntercept

public void setIntercept(double intercept)
Sets the point where the trendline crosses the value axis.

Parameters:
intercept - the point where the trendline crosses the value axis.
Throws:
CellsException - if Trendlines object has bean removed.

getIntercept

public double getIntercept()
Gets the point where the trendline crosses the value axis.

Returns:
the point where the trendline crosses the value axis.
Throws:
CellsException - if Trendlines object has bean removed.

displayRSquared

public boolean displayRSquared()
Indicates whether the equation for the trendline is displayed on the chart (in the same data label as the R-squared value).

Returns:
whether the equation for the trendline is displayed.
Throws:
CellsException - if Trendlines object has bean removed.
See Also:
setDisplayRSquared(boolean)

setDisplayRSquared

public void setDisplayRSquared(boolean displayRSquared)
Sets whether 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.

Parameters:
displayRSquared - whether the equation for the trendline is displayed on the chart.
Throws:
CellsException - if Trendlines object has bean removed.

displayEquation

public boolean displayEquation()
Indicates whether the R-squared value of the trendline is displayed on the chart (in the same data label as the equation).

Returns:
whether the R-squared value of the trendline is displayed on the chart.
Throws:
CellsException - if Trendlines object has bean removed.

setDisplayEquation

public void setDisplayEquation(boolean displayEquation)
Sets whether 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.

Parameters:
displayEquation - whether the R-squared value of the trendline is displayed on the chart.
Throws:
CellsException - if Trendlines object has bean removed.

isNameAuto

public boolean isNameAuto()
Indicats whether Microsoft Workbook automatically determines the name of the trendline.

Returns:
whether Microsoft Workbook automatically determines the name of the trendline.
Throws:
CellsException - if Trendlines object has bean removed.

setNameAuto

public void setNameAuto(boolean isNameAuto)
Sets whether Microsoft Workbook automatically determines the name of the trendline.

Parameters:
isNameAuto - whether Microsoft Workbook automatically determines the name of the trendline.
Throws:
CellsException - if Trendlines object has bean removed.

isInterceptAuto

public boolean isInterceptAuto()
Indicates whether Microsoft Workbook automatically determines the intercept of the trendline.

Returns:
whether Microsoft Workbook automatically determines the intercept of the trendline.
Throws:
CellsException - if Trendlines object has bean removed.

setInterceptAuto

public void setInterceptAuto(boolean setIntercept)
Sets whether Microsoft Workbook automatically determines the intercept of the trendline.

Parameters:
setIntercept - whether Microsoft Workbook automatically determines the intercept of the trendline.
Throws:
CellsException - if Trendlines object has bean removed.

getDataLabels

public DataLabels getDataLabels()
Gets the DataLabels object for Trendline

Returns:
the DataLabels object for Trendline