Class TrendLine

java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.trendline.TrendLine
All Implemented Interfaces:
Serializable

public class TrendLine extends AbstractChartObject
Creates a trendline for SerialChartModelImpl and XYChartModelImpl charts which indicates the trend of your data or covers some different purposes. Multiple can be assigned.

See documentation for properties of TrendLine JS Object.
http://docs.amcharts.com/3/javascriptcharts/TrendLine

See Also:
  • Constructor Details

    • TrendLine

      public TrendLine()
  • Method Details

    • getBalloonText

      public String getBalloonText()
      Returns:
      balloon text
    • setBalloonText

      @StudioProperty public TrendLine setBalloonText(String balloonText)
      Sets balloon text. When set, enables displaying a roll-over balloon.
      Parameters:
      balloonText - balloon text
      Returns:
      trend line
    • getDashLength

      public Integer getDashLength()
      Returns:
      dash length
    • setDashLength

      @StudioProperty(defaultValue="0") public TrendLine setDashLength(Integer dashLength)
      Sets dash length. If not set the default value is 0.
      Parameters:
      dashLength - dash length
      Returns:
      trend line
    • getFinalCategory

      public String getFinalCategory()
      Returns:
      final category string
    • setFinalCategory

      @StudioProperty public TrendLine setFinalCategory(String finalCategory)
      Sets string, equal to category value to which trend line should be drawn. It should be used if chart doesn't parse dates.
      Parameters:
      finalCategory - final category string
      Returns:
      trend line
    • getFinalDate

      public Date getFinalDate()
      Returns:
      date to which trend line should be drawn
    • setFinalDate

      @StudioProperty public TrendLine setFinalDate(Date finalDate)
      Sets date to which trend line should be drawn.
      Parameters:
      finalDate - final date
      Returns:
      trend line
    • getFinalValue

      public Double getFinalValue()
      Returns:
      value at which trend line is end
    • setFinalValue

      @StudioProperty public TrendLine setFinalValue(Double finalValue)
      Sets value at which trend line should end.
      Parameters:
      finalValue - final value
      Returns:
      trend line
    • getFinalXValue

      public Double getFinalXValue()
      Returns:
      X value at which trend line is end
    • setFinalXValue

      @StudioProperty public TrendLine setFinalXValue(Double finalXValue)
      Sets X value at which trend line should end. Used by XY chart only.
      Parameters:
      finalXValue - final X value
      Returns:
      trend line
    • getInitialCategory

      public String getInitialCategory()
      Returns:
      string equal to category value from which trend line should start
    • setInitialCategory

      @StudioProperty public TrendLine setInitialCategory(String initialCategory)
      Sets string equal to category value from which trend line should start. It should be used if chart doesn't parse dates.
      Parameters:
      initialCategory - initial category
      Returns:
      trend line
    • getInitialDate

      public Date getInitialDate()
      Returns:
      date from which trend line should start
    • setInitialDate

      @StudioProperty public TrendLine setInitialDate(Date initialDate)
      Sets date from which trend line should start.
      Parameters:
      initialDate - initial date
      Returns:
      trend line
    • getInitialValue

      public Double getInitialValue()
      Returns:
      value from which trend line should start
    • setInitialValue

      @StudioProperty public TrendLine setInitialValue(Double initialValue)
      Sets value from which trend line should start.
      Parameters:
      initialValue - initial value
      Returns:
      trend line
    • getInitialXValue

      public Double getInitialXValue()
      Returns:
      X value from which trend line should start
    • setInitialXValue

      @StudioProperty public TrendLine setInitialXValue(Double initialXValue)
      Sets X value from which trend line should start. Used by XY chart only
      Parameters:
      initialXValue - initial X value
      Returns:
      trend line
    • getProtected

      public Boolean getProtected()
      Returns:
      true if isProtected is enabled
    • setProtected

      @StudioProperty(defaultValue="false") public TrendLine setProtected(Boolean aProtected)
      Set isProtected to true if trend line shouldn't be removed when clicked on eraser tool. Used by stock chart. If not set the default value is false.
      Parameters:
      aProtected - isProtected option
      Returns:
      trend line
    • getLineAlpha

      public Double getLineAlpha()
      Returns:
      line opacity
    • setLineAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) TrendLine setLineAlpha(Double lineAlpha)
      Sets line opacity. If not set the default value is 1.
      Parameters:
      lineAlpha - opacity
      Returns:
      trend line
    • getLineColor

      public Color getLineColor()
      Returns:
      line color
    • setLineColor

      @StudioProperty(type=OPTIONS, defaultValue="#00CC00") public TrendLine setLineColor(Color lineColor)
      Sets line color. If not set the default value is #00CC00.
      Parameters:
      lineColor - color
      Returns:
      trend line
    • getLineThickness

      public Integer getLineThickness()
      Returns:
      line thickness
    • setLineThickness

      @StudioProperty(defaultValue="1") public TrendLine setLineThickness(Integer lineThickness)
      Sets line thickness. If not set the default value is 1.
      Parameters:
      lineThickness - thickness
      Returns:
      trend line
    • getValueAxis

      public String getValueAxis()
      Returns:
      value axis id
    • setValueAxis

      @StudioProperty public TrendLine setValueAxis(String valueAxis)
      Sets value axis of the trend line. Will use first value axis of the chart if not set any.
      Parameters:
      valueAxis - value axis id
      Returns:
      trend line
    • getValueAxisX

      public String getValueAxisX()
      Returns:
      value axis X id
    • setValueAxisX

      @StudioProperty public TrendLine setValueAxisX(String valueAxisX)
      Sets X axis of the trend line. Will use first X axis of the chart if not set any. Used by XY chart only.
      Parameters:
      valueAxisX - value axis X id
      Returns:
      trend line
    • getId

      public String getId()
      Returns:
      id of a trend line
    • setId

      @StudioProperty public TrendLine setId(String id)
      Sets unique id of a trend line.
      Parameters:
      id - id
      Returns:
      trend line
    • getFinalImage

      public Image getFinalImage()
      Returns:
      final image
    • setFinalImage

      public TrendLine setFinalImage(Image finalImage)
      Sets an image to the end of a trend line.
      Parameters:
      finalImage - final image
      Returns:
      trend line
    • getInitialImage

      public Image getInitialImage()
      Returns:
      initial image
    • setInitialImage

      public TrendLine setInitialImage(Image initialImage)
      Sets an image to the beginning of a trend line.
      Parameters:
      initialImage - initial image
      Returns:
      trend line