Class StockPanel

All Implemented Interfaces:
HasStartEffect<StockPanel>, ChartModel<StockPanel>, CoordinateChartModel<StockPanel>, RectangularChartModel<StockPanel>, SeriesBasedChartModel<StockPanel>, HasColors<StockPanel>, HasMargins<StockPanel>, Serializable

public class StockPanel extends AbstractSerialChart<StockPanel> implements SeriesBasedChartModel<StockPanel>
Creates stock panels (charts). StockChartModel can have multiple Stock panels.
See documentation for properties of StockPanel JS object.

http://docs.amcharts.com/3/javascriptstockchart/StockPanel
See Also:
  • Constructor Details

    • StockPanel

      public StockPanel()
  • Method Details

    • getId

      public String getId()
    • setId

      public StockPanel setId(String id)
    • getAllowTurningOff

      public Boolean getAllowTurningOff()
      Returns:
      true if x button is displayed near the panel
    • setAllowTurningOff

      @StudioProperty(defaultValue="false") public StockPanel setAllowTurningOff(Boolean allowTurningOff)
      Set allowTurningOff to true if x button should be displayed near the panel. This button allows turning panel off. If not set the default value is false.
      Parameters:
      allowTurningOff - allowTurningOff option
      Returns:
      stock panel
    • getDrawingIconsEnabled

      public Boolean getDrawingIconsEnabled()
      Returns:
      true if drawing icons is displayed in top-right corner
    • setDrawingIconsEnabled

      @StudioProperty(defaultValue="false") public StockPanel setDrawingIconsEnabled(Boolean drawingIconsEnabled)
      Set drawingIconsEnabled to true if drawing icons should be displayed in top-right corner. If not set the default value is false.
      Parameters:
      drawingIconsEnabled - drawingIconsEnabled option
      Returns:
      stock panel
    • getDrawOnAxis

      public ValueAxis getDrawOnAxis()
      Returns:
      value axis
    • setDrawOnAxis

      public StockPanel setDrawOnAxis(ValueAxis drawOnAxis)
      Sets value axis. Specifies on which value axis user can draw trend lines. Set drawingIconsEnabled to true if you want drawing icons to be visible. First value axis will be used if not set here. You can use a reference to the value axis object or id of value axis.
      Parameters:
      drawOnAxis - value axis
      Returns:
      stock panel
    • getEraseAll

      public Boolean getEraseAll()
      Returns:
      true if all trend lines are erased
    • setEraseAll

      @StudioProperty(defaultValue="false") public StockPanel setEraseAll(Boolean eraseAll)
      Set eraseAll to true if all trend lines should be erased when erase button is clicked. If eraseAll is set to false trend lines will be erased one by one. If not set the default value is false.
      Parameters:
      eraseAll - eraseAll option
      Returns:
      stock panel
    • getIconSize

      public Integer getIconSize()
      Returns:
      size of trend line drawing icons
    • setIconSize

      @StudioProperty(defaultValue="18") public StockPanel setIconSize(Integer iconSize)
      Sets size of trend line drawing icons. If you change this size, you should update icon images if you want them to look properly. If not set the default value is 18.
      Parameters:
      iconSize - icon size
      Returns:
      stock panel
    • getPercentHeight

      public Integer getPercentHeight()
      Returns:
      relative height of panel
    • setPercentHeight

      @StudioProperty @Max(100L) @Min(0L) public @Max(100L) @Min(0L) StockPanel setPercentHeight(Integer percentHeight)
      Sets relative height of panel. Possible values 0 - 100.
      Parameters:
      percentHeight - percent height
      Returns:
      stock panel
    • getRecalculateFromDate

      public Date getRecalculateFromDate()
      Returns:
      from which date's value is used as a base when recalculating values to percent
    • setRecalculateFromDate

      @StudioProperty public StockPanel setRecalculateFromDate(Date recalculateFromDate)
      Sets from which date's value should be used as a base when recalculating values to percent.
      Parameters:
      recalculateFromDate - date
      Returns:
      stock panel
    • getRecalculateToPercents

      public String getRecalculateToPercents()
      Returns:
      recalculate to percents value
    • setRecalculateToPercents

      @StudioProperty(type=OPTIONS, options={"never","always","whenComparing"}, defaultValue="whenComparing") public StockPanel setRecalculateToPercents(String recalculateToPercents)
      Specifies when values should be recalculated to percents. Possible values are: "never", "always", "whenComparing". If not set the default value is "whenComparing".
      Parameters:
      recalculateToPercents - recalculate to percents value
      Returns:
      stock panel
    • getShowCategoryAxis

      public Boolean getShowCategoryAxis()
      Returns:
      true of this panel shows category axis
    • setShowCategoryAxis

      @StudioProperty(defaultValue="true") public StockPanel setShowCategoryAxis(Boolean showCategoryAxis)
      Set showCategoryAxis to false if this panel should't show category axis. If not set the default value is true.
      Parameters:
      showCategoryAxis - showCategoryAxis option
      Returns:
      stock panel
    • getShowComparedOnTop

      public Boolean getShowComparedOnTop()
      Returns:
      true if compared graphs are shown above or behind the main graph
    • setShowComparedOnTop

      @StudioProperty(defaultValue="true") public StockPanel setShowComparedOnTop(Boolean showComparedOnTop)
      Set showComparedOnTop to false if compared graphs shouldn't be shown above or behind the main graph. If not set the default value is true.
      Parameters:
      showComparedOnTop - showComparedOnTop option
      Returns:
      stock panel
    • getStockGraphs

      public List<StockGraph> getStockGraphs()
      Returns:
      list of stock graphs
    • setStockGraphs

      @StudioElementsGroup(caption="Stock Graphs", xmlElement="stockGraphs") public StockPanel setStockGraphs(List<StockGraph> stockGraphs)
      Sets list of stock graphs.
      Parameters:
      stockGraphs - list of stock graphs
      Returns:
      stock panel
    • addStockGraphs

      public StockPanel addStockGraphs(StockGraph... stockGraphs)
      Adds stock graphs
      Parameters:
      stockGraphs - stock graphs
      Returns:
      stock panel
    • getStockLegend

      public StockLegend getStockLegend()
      Returns:
      stock chart legend.
    • setStockLegend

      public StockPanel setStockLegend(StockLegend stockLegend)
      Sets stock chart legend.
      Parameters:
      stockLegend - stock legend
      Returns:
      stock panel
    • getTitle

      public String getTitle()
      Returns:
      title of a panel
    • setTitle

      @StudioProperty public StockPanel setTitle(String title)
      Sets a title of a panel. Note, StockLegend should be added in order title to be displayed.
      Parameters:
      title - title
      Returns:
      stock panel
    • getTrendLineAlpha

      public Double getTrendLineAlpha()
      Returns:
      trend line opacity
    • setTrendLineAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) StockPanel setTrendLineAlpha(Double trendLineAlpha)
      Sets trend line opacity. If not set the default value is 1.
      Parameters:
      trendLineAlpha - opacity
      Returns:
      stock panel
    • getTrendLineColor

      public Color getTrendLineColor()
      Returns:
      trend line color
    • setTrendLineColor

      @StudioProperty(type=OPTIONS, defaultValue="#00CC00") public StockPanel setTrendLineColor(Color trendLineColor)
      Sets trend line color. If not set the default value is #00CC00.
      Parameters:
      trendLineColor - color
      Returns:
      stock panel
    • getTrendLineDashLength

      public Integer getTrendLineDashLength()
      Returns:
      trend line dash length
    • setTrendLineDashLength

      @StudioProperty(defaultValue="0") public StockPanel setTrendLineDashLength(Integer trendLineDashLength)
      Sets trend line dash length. If not set the default value is 0.
      Parameters:
      trendLineDashLength - dash length
      Returns:
      stock panel
    • getTrendLineThickness

      public Integer getTrendLineThickness()
      Returns:
      trend line thickness
    • setTrendLineThickness

      @StudioProperty(defaultValue="2") public StockPanel setTrendLineThickness(Integer trendLineThickness)
      Sets trend line thickness. If not set the default value is 2.
      Parameters:
      trendLineThickness - thickness
      Returns:
      stock panel
    • getBezierX

      public Integer getBezierX()
      Returns:
      horizontal tension of bezier
    • setBezierX

      @StudioProperty @Min(1L) public @Min(1L) StockPanel setBezierX(Integer bezierX)
      Sets horizontal tension of bezier (used by smoothed line). If not set, chart adjust tension by itself, taking into account if chart is rotated or not. Allowed values 1 - Infinity.
      Parameters:
      bezierX - horizontal tension
      Returns:
      stock panel
    • getBezierY

      public Integer getBezierY()
      Returns:
      vertical tension of bezier
    • setBezierY

      @StudioProperty @Min(1L) public @Min(1L) StockPanel setBezierY(Integer bezierY)
      Sets vertical tension of bezier (used by smoothed line). If not set, chart adjust tension by itself, taking into account if chart is rotated or not. Allowed values 1 - Infinity.
      Parameters:
      bezierY - vertical tension
      Returns:
      stock panel
    • getWiredFields

      public List<String> getWiredFields()
      Overrides:
      getWiredFields in class AbstractSerialChart<StockPanel>
      Returns:
      fields of the DataItem that are bound to the chart