Interface STrendline

All Known Implementing Classes:
TrendlineImpl

public interface STrendline
Represents a trendline on a chart series.

Reference: ECMA-376 5th Edition, sect. 21.2.2.234 (trendline).

Since:
7.0.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The type of regression / trend calculation.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the number of periods to forecast backward.
    double
    Returns the number of periods to forecast forward.
    Returns the forced intercept value, or null if auto.
    Returns the custom name of this trendline, or null if using the default.
    int
    Returns the polynomial order (valid range 2-6, only meaningful when type is POLYNOMIAL).
    int
    Returns the moving-average period (only meaningful when type is MOVING_AVERAGE).
    Returns the trendline type.
    boolean
    Returns whether the equation is displayed on the chart.
    boolean
    Returns whether the R-squared value is displayed on the chart.
    void
    setBackward(double periods)
    Sets the number of periods to forecast backward.
    void
    setDisplayEquation(boolean display)
    Sets whether the equation is displayed on the chart.
    void
    setDisplayRSquared(boolean display)
    Sets whether the R-squared value is displayed on the chart.
    void
    setForward(double periods)
    Sets the number of periods to forecast forward.
    void
    setIntercept(Double intercept)
    Sets the forced intercept value.
    void
    Sets the custom name of this trendline.
    void
    setOrder(int order)
    Sets the polynomial order (valid range 2-6).
    void
    setPeriod(int period)
    Sets the moving-average period.
    void
    Sets the trendline type.
  • Method Details

    • getType

      Returns the trendline type.
    • setType

      void setType(STrendline.TrendlineType type)
      Sets the trendline type.
    • getOrder

      int getOrder()
      Returns the polynomial order (valid range 2-6, only meaningful when type is POLYNOMIAL).
    • setOrder

      void setOrder(int order)
      Sets the polynomial order (valid range 2-6).
    • getPeriod

      int getPeriod()
      Returns the moving-average period (only meaningful when type is MOVING_AVERAGE).
    • setPeriod

      void setPeriod(int period)
      Sets the moving-average period.
    • getForward

      double getForward()
      Returns the number of periods to forecast forward.
    • setForward

      void setForward(double periods)
      Sets the number of periods to forecast forward.
    • getBackward

      double getBackward()
      Returns the number of periods to forecast backward.
    • setBackward

      void setBackward(double periods)
      Sets the number of periods to forecast backward.
    • getIntercept

      Double getIntercept()
      Returns the forced intercept value, or null if auto.
    • setIntercept

      void setIntercept(Double intercept)
      Sets the forced intercept value. Pass null for auto.
    • isDisplayRSquared

      boolean isDisplayRSquared()
      Returns whether the R-squared value is displayed on the chart.
    • setDisplayRSquared

      void setDisplayRSquared(boolean display)
      Sets whether the R-squared value is displayed on the chart.
    • isDisplayEquation

      boolean isDisplayEquation()
      Returns whether the equation is displayed on the chart.
    • setDisplayEquation

      void setDisplayEquation(boolean display)
      Sets whether the equation is displayed on the chart.
    • getName

      String getName()
      Returns the custom name of this trendline, or null if using the default.
    • setName

      void setName(String name)
      Sets the custom name of this trendline.