Package io.jmix.charts.model.settings
Class ChartCursorSettings
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.settings.ChartCursorSettings
- All Implemented Interfaces:
Serializable
Defines set of properties for chart cursor. If there is no default value specified, default value of
See documentation for properties of ChartCursorSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/ChartCursorSettings
Cursor
class will be used.
See documentation for properties of ChartCursorSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/ChartCursorSettings
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCategoryBalloonDateFormats
(DateFormat... categoryBalloonDateFormats) Adds date formats.getColor()
getPan()
setBalloonPointerOrientation
(BalloonPointerOrientation balloonPointerOrientation) Sets orientation of value balloon pointer.setBulletsEnabled
(Boolean bulletsEnabled) Specifies if bullet for each graph will follow the cursor.setBulletSize
(Integer bulletSize) Sets size of bullets, following the cursor.@Max(1L) @Min(0L) ChartCursorSettings
setCategoryBalloonAlpha
(Double categoryBalloonAlpha) Sets opacity of the category balloon.setCategoryBalloonColor
(Color categoryBalloonColor) Sets color of the category balloon.setCategoryBalloonDateFormats
(List<DateFormat> categoryBalloonDateFormats) Sets list of date formats.setCategoryBalloonEnabled
(Boolean categoryBalloonEnabled) Specifies whether category balloon is enabled.setCategoryBalloonText
(String categoryBalloonText) Sets category balloon text.Sets text color.@Max(1L) @Min(0L) ChartCursorSettings
setCursorAlpha
(Double cursorAlpha) Sets opacity of the cursor line.setCursorColor
(Color cursorColor) Sets color of the cursor line.setCursorPosition
(CursorPosition cursorPosition) Sets cursor position.setEnabled
(Boolean enabled) Set enabled to false if you don't want chart cursor to appear in your charts.setFullWidth
(Boolean fullWidth) Set to true if you want instead of a cursor line user should see a fill which width will always be equal to the width of one data item.setGraphBulletSize
(Double graphBulletSize) Sets size of a graph's bullet (if available) at the cursor position.setLeaveAfterTouch
(Boolean leaveAfterTouch) Set leaveAfterTouch to false if cursor and balloons shouldn't remain after the user touches the chart.setLeaveCursor
(Boolean leaveCursor) Set leaveCursor to true if cursor should be left at it's last position.setOnePanelOnly
(Boolean onePanelOnly) Set onePanelOnly to true if stock chart should display value balloons on currently hovered panel only.Set pan to true and the user will be able to pan the chart instead of zooming.void
setSelectWithoutZooming
(Boolean selectWithoutZooming) Set selectWithoutZooming to true if cursor should only mark selected area but not zoom-in after user releases mouse button.void
setShowNextAvailable
(Boolean showNextAvailable) If true, the graph will display balloon on next available data point if currently hovered item doesn't have value for this graph.setValueBalloonsEnabled
(Boolean valueBalloonsEnabled) Set valueBalloonsEnabled to true if value balloons should be enabled.@Max(1L) @Min(0L) ChartCursorSettings
setValueLineAlpha
(Double valueLineAlpha) Sets opacity of value line.setValueLineBalloonEnabled
(Boolean valueLineBalloonEnabled) Set valueLineBalloonEnabled to true if value balloon next to value axis labels should be displayed.setValueLineEnabled
(Boolean valueLineEnabled) Set valueLineEnabled to true if cursor of serial chart should display horizontal (or vertical if chart is rotated) line.setZoomable
(Boolean zoomable) Set zoomable to true if the user should zoom-in the chart.
-
Constructor Details
-
ChartCursorSettings
public ChartCursorSettings()
-
-
Method Details
-
getBalloonPointerOrientation
- Returns:
- orientation of value balloon pointer
-
setBalloonPointerOrientation
@StudioProperty(type=ENUMERATION, defaultValue="HORIZONTAL") public ChartCursorSettings setBalloonPointerOrientation(BalloonPointerOrientation balloonPointerOrientation) Sets orientation of value balloon pointer. If not set the default value is HORIZONTAL.- Parameters:
balloonPointerOrientation
- orientation of value balloon pointer- Returns:
- chart cursor settings
-
getBulletsEnabled
- Returns:
- true if bulletsEnabled is enabled
-
setBulletsEnabled
Specifies if bullet for each graph will follow the cursor.- Parameters:
bulletsEnabled
- bulletsEnabled option- Returns:
- chart cursor settings
-
getBulletSize
- Returns:
- bullet size
-
setBulletSize
Sets size of bullets, following the cursor.- Parameters:
bulletSize
- bullet size- Returns:
- chart cursor settings
-
getCategoryBalloonAlpha
- Returns:
- opacity of the category balloon
-
setCategoryBalloonAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartCursorSettings setCategoryBalloonAlpha(Double categoryBalloonAlpha) Sets opacity of the category balloon.- Parameters:
categoryBalloonAlpha
- opacity of the category balloon- Returns:
- chart cursor settings
-
getCategoryBalloonColor
- Returns:
- color of the category balloon
-
setCategoryBalloonColor
@StudioProperty(type=OPTIONS) public ChartCursorSettings setCategoryBalloonColor(Color categoryBalloonColor) Sets color of the category balloon.- Parameters:
categoryBalloonColor
- color of the category balloon- Returns:
- chart cursor settings
-
getCategoryBalloonDateFormats
- Returns:
- list of date formats
-
setCategoryBalloonDateFormats
@StudioElementsGroup(caption="Category Ballon Date Formats", xmlElement="categoryBalloonDateFormats") public ChartCursorSettings setCategoryBalloonDateFormats(List<DateFormat> categoryBalloonDateFormats) Sets list of date formats. If not set the default value is[{period:"YYYY", format:"YYYY"}, {period:"MM", format:"MMM, YYYY"}, {period:"WW", format:"MMM DD, YYYY"}, {period:"DD", format:"MMM DD, YYYY"}, {period:"hh", format:"JJ:NN"}, {period:"mm", format:"JJ:NN"}, {period:"ss", format:"JJ:NN:SS"}, {period:"fff", format:"JJ:NN:SS"}]
- Parameters:
categoryBalloonDateFormats
- list of date formats- Returns:
- chart cursor settings
-
addCategoryBalloonDateFormats
Adds date formats.- Parameters:
categoryBalloonDateFormats
- date formats- Returns:
- chart cursor settings
-
getCategoryBalloonEnabled
- Returns:
- true if categoryBalloonEnabled is enabled
-
setCategoryBalloonEnabled
@StudioProperty public ChartCursorSettings setCategoryBalloonEnabled(Boolean categoryBalloonEnabled) Specifies whether category balloon is enabled.- Parameters:
categoryBalloonEnabled
- categoryBalloonEnabled option- Returns:
- chart cursor settings
-
getCategoryBalloonText
- Returns:
- category balloon text
-
setCategoryBalloonText
@StudioProperty(defaultValue="[[category]]") public ChartCursorSettings setCategoryBalloonText(String categoryBalloonText) Sets category balloon text. You can have [[category]] - [[toCategory]] tags in there and show category ranges this way. If not set the default value is "[[category]]".- Parameters:
categoryBalloonText
- category balloon text- Returns:
- chart cursor settings
-
getCursorAlpha
- Returns:
- opacity of the cursor line
-
setCursorAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartCursorSettings setCursorAlpha(Double cursorAlpha) Sets opacity of the cursor line.- Parameters:
cursorAlpha
- opacity of the cursor line- Returns:
- chart cursor settings
-
getCursorColor
- Returns:
- color of the cursor line
-
setCursorColor
@StudioProperty(type=OPTIONS, defaultValue="#FFFFFF") public ChartCursorSettings setCursorColor(Color cursorColor) Sets color of the cursor line. If not set the default value is #FFFFFF.- Parameters:
cursorColor
- color of the cursor line- Returns:
- chart cursor settings
-
getCursorPosition
- Returns:
- cursor position
-
setCursorPosition
@StudioProperty(type=ENUMERATION) public ChartCursorSettings setCursorPosition(CursorPosition cursorPosition) Sets cursor position. Possible values: start, middle, mouse.- Parameters:
cursorPosition
- cursor position- Returns:
- chart cursor settings
-
getEnabled
- Returns:
- true if this property is enabled
-
setEnabled
Set enabled to false if you don't want chart cursor to appear in your charts. If not set the default value is true.- Parameters:
enabled
- enabled option- Returns:
- chart cursor settings
-
getFullWidth
- Returns:
- true if a fill width always equals to the width of one data item
-
setFullWidth
Set to true if you want instead of a cursor line user should see a fill which width will always be equal to the width of one data item. It is recommended setting cursorAlpha to 0.1 or some other small number if using this feature. If not set the default value is false.- Parameters:
fullWidth
- fullWidth option- Returns:
- chart cursor settings
-
getGraphBulletSize
- Returns:
- size of a graph's bullet
-
setGraphBulletSize
@StudioProperty(defaultValue="1.7") public ChartCursorSettings setGraphBulletSize(Double graphBulletSize) Sets size of a graph's bullet (if available) at the cursor position. If you don't want the bullet to change its size, set this property to 1. If not set the default value is 1.7- Parameters:
graphBulletSize
- size of a graph's bullet- Returns:
- chart cursor settings
-
getLeaveAfterTouch
- Returns:
- true if cursor and balloons remain after the user touches the chart
-
setLeaveAfterTouch
@StudioProperty(defaultValue="true") public ChartCursorSettings setLeaveAfterTouch(Boolean leaveAfterTouch) Set leaveAfterTouch to false if cursor and balloons shouldn't remain after the user touches the chart. If not set the default value is true.- Parameters:
leaveAfterTouch
- leaveAfterTouch option- Returns:
- chart cursor settings
-
getLeaveCursor
- Returns:
- true if the cursor remains in the last position
-
setLeaveCursor
@StudioProperty(defaultValue="false") public ChartCursorSettings setLeaveCursor(Boolean leaveCursor) Set leaveCursor to true if cursor should be left at it's last position. Useful for touch devices - user might want to see the balloons after he moves finger away. If not set the default value is false.- Parameters:
leaveCursor
- leaveCursor option- Returns:
- chart cursor settings
-
getOnePanelOnly
- Returns:
- true if stock chart displays value balloons on currently hovered panel only
-
setOnePanelOnly
@StudioProperty(defaultValue="false") public ChartCursorSettings setOnePanelOnly(Boolean onePanelOnly) Set onePanelOnly to true if stock chart should display value balloons on currently hovered panel only. If not set the default value is false.- Parameters:
onePanelOnly
- onePanelOnly option- Returns:
- chart cursor settings
-
getPan
- Returns:
- true if the user can pan the chart instead of zooming
-
setPan
Set pan to true and the user will be able to pan the chart instead of zooming.- Parameters:
pan
- pan option- Returns:
- chart cursor settings
-
getValueBalloonsEnabled
- Returns:
- true if value balloons is enabled
-
setValueBalloonsEnabled
@StudioProperty(defaultValue="false") public ChartCursorSettings setValueBalloonsEnabled(Boolean valueBalloonsEnabled) Set valueBalloonsEnabled to true if value balloons should be enabled. In case they are not enabled, the balloons might be displayed anyway, when the user rolls-over the column or bullet. If not set the default value is false.- Parameters:
valueBalloonsEnabled
- valueBalloonsEnabled option- Returns:
- chart cursor settings
-
getValueLineAlpha
- Returns:
- opacity of value line
-
setValueLineAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartCursorSettings setValueLineAlpha(Double valueLineAlpha) Sets opacity of value line. Will use cursorAlpha value if not set.- Parameters:
valueLineAlpha
- opacity of value line- Returns:
- chart cursor settings
-
getValueLineBalloonEnabled
- Returns:
- true if value balloon next to value axis labels is displayed
-
setValueLineBalloonEnabled
@StudioProperty(defaultValue="false") public ChartCursorSettings setValueLineBalloonEnabled(Boolean valueLineBalloonEnabled) Set valueLineBalloonEnabled to true if value balloon next to value axis labels should be displayed. If you have more than one axis, setCursor.valueLineAxis
to indicate which axis should display the balloon. If not set the default value is false.- Parameters:
valueLineBalloonEnabled
- valueLineBalloonEnabled option- Returns:
- chart cursor settings
-
getValueLineEnabled
- Returns:
- true if cursor of serial chart displays horizontal (or vertical if chart is rotated) line
-
setValueLineEnabled
@StudioProperty(defaultValue="false") public ChartCursorSettings setValueLineEnabled(Boolean valueLineEnabled) Set valueLineEnabled to true if cursor of serial chart should display horizontal (or vertical if chart is rotated) line. This line might help users to compare distant values of a chart. You can also enable value balloon on this line by settingCursor.valueLineAxis
property. If not set the default value is false.- Parameters:
valueLineEnabled
- valueLineEnabled option- Returns:
- chart cursor settings
-
getZoomable
- Returns:
- true if the user can zoom-in the chart
-
setZoomable
Set zoomable to true if the user should zoom-in the chart. If pan is set to true, zoomable is switched to false automatically.- Parameters:
zoomable
- zoomable option- Returns:
- chart cursor settings
-
getColor
- Returns:
- text color
-
setColor
Sets text color.- Parameters:
color
- text color- Returns:
- chart cursor settings
-
getSelectWithoutZooming
- Returns:
- true if cursor selects area but not zoom-in
-
setSelectWithoutZooming
@StudioProperty(defaultValue="false") public void setSelectWithoutZooming(Boolean selectWithoutZooming) Set selectWithoutZooming to true if cursor should only mark selected area but not zoom-in after user releases mouse button. If not set the default value is false.- Parameters:
selectWithoutZooming
- selectWithoutZooming option
-
getShowNextAvailable
- Returns:
- true if graph displays balloon on next available data point while currently hovered item doesn't have value for this graph
-
setShowNextAvailable
If true, the graph will display balloon on next available data point if currently hovered item doesn't have value for this graph. If not set the default value is false.- Parameters:
showNextAvailable
- showNextAvailable option
-