Class StockEvent

java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.stock.StockEvent
All Implemented Interfaces:
Serializable

public class StockEvent extends AbstractChartObject
StockEvent is object which holds information about event (bullet). Values from StockEventsSettings will be used if not set. Stock event bullet's size depends on it's AbstractGraph.fontSize. When user rolls-over, clicks or rolls-out of the event bullet, StockChartModel dispatches events.
See documentation for properties of StockEvent JS object.
http://docs.amcharts.com/3/javascriptstockchart/StockEvent
See Also:
  • Constructor Details

    • StockEvent

      public StockEvent()
  • Method Details

    • getId

      public UUID getId()
    • getBackgroundAlpha

      public Double getBackgroundAlpha()
      Returns:
      opacity of bullet background
    • setBackgroundAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) StockEvent setBackgroundAlpha(Double backgroundAlpha)
      Sets opacity of bullet background. If not set the default value is 1.
      Parameters:
      backgroundAlpha - opacity
      Returns:
      stock event
    • getBackgroundColor

      public Color getBackgroundColor()
      Returns:
      color of bullet background
    • setBackgroundColor

      @StudioProperty(type=OPTIONS, defaultValue="#DADADA") public StockEvent setBackgroundColor(Color backgroundColor)
      Sets color of bullet background. If not set the default value is #DADADA.
      Parameters:
      backgroundColor - color
      Returns:
      stock event
    • getBorderAlpha

      public Double getBorderAlpha()
      Returns:
      opacity of bullet border
    • setBorderAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) StockEvent setBorderAlpha(Double borderAlpha)
      Sets opacity of bullet border. If not set the default value is 1.
      Parameters:
      borderAlpha - opacity
      Returns:
      stock event
    • getBorderColor

      public Color getBorderColor()
      Returns:
      bullet border color
    • setBorderColor

      @StudioProperty(type=OPTIONS, defaultValue="#888888") public StockEvent setBorderColor(Color borderColor)
      Sets bullet border color. If not set the default value is #888888.
      Parameters:
      borderColor - color
      Returns:
      stock event
    • getColor

      public Color getColor()
      Returns:
      color of the event text
    • setColor

      @StudioProperty(type=OPTIONS, defaultValue="#000000") public StockEvent setColor(Color color)
      Sets color of the event text. If not set the default value is #000000.
      Parameters:
      color - color
      Returns:
      stock event
    • getDate

      public Date getDate()
      Returns:
      date of an event
    • setDate

      @StudioProperty public StockEvent setDate(Date date)
      Sets date of an event.
      Parameters:
      date - date
      Returns:
      stock event
    • getDescription

      public String getDescription()
      Returns:
      description that is shown in a balloon when user rolls over mouse cursor over event icon
    • setDescription

      @StudioProperty public StockEvent setDescription(String description)
      Sets a description that will be shown in a balloon when user rolls over mouse cursor over event icon.
      Parameters:
      description - description
      Returns:
      stock event
    • getFontSize

      public Integer getFontSize()
      Returns:
      font size of a event bullet
    • setFontSize

      @StudioProperty public StockEvent setFontSize(Integer fontSize)
      Sets font size of a event bullet. Will use graph's or chart font size if not set.
      Parameters:
      fontSize - font size
      Returns:
      stock event
    • getGraph

      public String getGraph()
      Returns:
      id of the graph on which event is displayed
    • setGraph

      @StudioProperty public StockEvent setGraph(String graph)
      Sets id of the graph on which event will be displayed.
      Parameters:
      graph - graph id
      Returns:
      stock event
    • getRollOverColor

      public Color getRollOverColor()
      Returns:
      roll-over background color
    • setRollOverColor

      @StudioProperty(type=OPTIONS, defaultValue="#CC0000") public StockEvent setRollOverColor(Color rollOverColor)
      Sets roll-over background color. If not set the default value is #CC0000.
      Parameters:
      rollOverColor - color
      Returns:
      stock event
    • getShowAt

      public String getShowAt()
      Returns:
      showAt string
    • setShowAt

      @StudioProperty(type=OPTIONS, options={"open","close","low","high"}) public StockEvent setShowAt(String showAt)
      Allows placing event bullets at "open", "close", "low", "high" values.
      Parameters:
      showAt - showAt string
      Returns:
      stock event
    • getShowBullet

      public Boolean getShowBullet()
      Returns:
      true if the data point displays both event and regular (if set) bullets
    • setShowBullet

      @StudioProperty(defaultValue="false") public StockEvent setShowBullet(Boolean showBullet)
      Set showBullet to true if the data point should display both event and regular (if set) bullets. If not set the default value is false.
      Parameters:
      showBullet - showBullet option
      Returns:
      stock event
    • getShowOnAxis

      public Boolean getShowOnAxis()
      Returns:
      true if the event is displayed on the category axis
    • setShowOnAxis

      @StudioProperty(defaultValue="false") public StockEvent setShowOnAxis(Boolean showOnAxis)
      Set showOnAxis to true if the event should be displayed on the category axis. If not set the default value is false.
      Parameters:
      showOnAxis - showOnAxis option
      Returns:
      stock event
    • getText

      public String getText()
      Returns:
      text
    • setText

      @StudioProperty public StockEvent setText(String text)
      Sets letter which will be displayed on the event. Not all types can display letters. "text" type can display longer texts.
      Parameters:
      text - text
      Returns:
      stock event
    • getType

      public StockEventType getType()
      Returns:
      type of bullet
    • setType

      Sets type of bullet. If not set the default value is SIGN.
      Parameters:
      type - type
      Returns:
      stock event
    • getUrl

      public String getUrl()
      Returns:
      the URL
    • setUrl

      @StudioProperty public StockEvent setUrl(String url)
      Sets the URL to go to when user clicks the event.
      Parameters:
      url - the URL
      Returns:
      stock event
    • getUrlTarget

      public String getUrlTarget()
      Returns:
      target of URL
    • setUrlTarget

      @StudioProperty(type=OPTIONS, options={"_blank","_parent","_self","_top"}) public StockEvent setUrlTarget(String urlTarget)
      Sets target of URL, "_blank" for example.
      Parameters:
      urlTarget - URL target
      Returns:
      stock event
    • getValue

      public Double getValue()
      Returns:
      specified value
    • setValue

      @StudioProperty public StockEvent setValue(Double value)
      Allows placing event bullets at specified value.
      Parameters:
      value - value
      Returns:
      stock event