Package io.jmix.charts.model.stock
Class StockEvent
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.stock.StockEvent
- All Implemented Interfaces:
Serializable
StockEvent is object which holds information about event (bullet). Values from
See documentation for properties of StockEvent JS object.
http://docs.amcharts.com/3/javascriptstockchart/StockEvent
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetColor()
getDate()
getGraph()
getId()
getText()
getType()
getUrl()
getValue()
@Max(1L) @Min(0L) StockEvent
setBackgroundAlpha
(Double backgroundAlpha) Sets opacity of bullet background.setBackgroundColor
(Color backgroundColor) Sets color of bullet background.@Max(1L) @Min(0L) StockEvent
setBorderAlpha
(Double borderAlpha) Sets opacity of bullet border.setBorderColor
(Color borderColor) Sets bullet border color.Sets color of the event text.Sets date of an event.setDescription
(String description) Sets a description that will be shown in a balloon when user rolls over mouse cursor over event icon.setFontSize
(Integer fontSize) Sets font size of a event bullet.Sets id of the graph on which event will be displayed.setRollOverColor
(Color rollOverColor) Sets roll-over background color.Allows placing event bullets at "open", "close", "low", "high" values.setShowBullet
(Boolean showBullet) Set showBullet to true if the data point should display both event and regular (if set) bullets.setShowOnAxis
(Boolean showOnAxis) Set showOnAxis to true if the event should be displayed on the category axis.Sets letter which will be displayed on the event.setType
(StockEventType type) Sets type of bullet.Sets the URL to go to when user clicks the event.setUrlTarget
(String urlTarget) Sets target of URL, "_blank" for example.Allows placing event bullets at specified value.
-
Constructor Details
-
StockEvent
public StockEvent()
-
-
Method Details
-
getId
-
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
- 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
- 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
- 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
- Returns:
- color of the event text
-
setColor
Sets color of the event text. If not set the default value is #000000.- Parameters:
color
- color- Returns:
- stock event
-
getDate
- Returns:
- date of an event
-
setDate
Sets date of an event.- Parameters:
date
- date- Returns:
- stock event
-
getDescription
- Returns:
- description that is shown in a balloon when user rolls over mouse cursor over event icon
-
setDescription
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
- Returns:
- font size of a event bullet
-
setFontSize
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
- Returns:
- id of the graph on which event is displayed
-
setGraph
Sets id of the graph on which event will be displayed.- Parameters:
graph
- graph id- Returns:
- stock event
-
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
- 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
- Returns:
- true if the data point displays both event and regular (if set) bullets
-
setShowBullet
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
- Returns:
- true if the event is displayed on the category axis
-
setShowOnAxis
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
- Returns:
- text
-
setText
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
- Returns:
- type of bullet
-
setType
@StudioProperty(type=ENUMERATION, defaultValue="SIGN") public StockEvent setType(StockEventType type) Sets type of bullet. If not set the default value is SIGN.- Parameters:
type
- type- Returns:
- stock event
-
getUrl
- Returns:
- the URL
-
setUrl
Sets the URL to go to when user clicks the event.- Parameters:
url
- the URL- Returns:
- stock event
-
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
- Returns:
- specified value
-
setValue
Allows placing event bullets at specified value.- Parameters:
value
- value- Returns:
- stock event
-