Package io.jmix.charts.model.settings
Class ChartScrollbarSettings
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.settings.ChartScrollbarSettings
- All Implemented Interfaces:
Serializable
Defines set of properties for chart scrollbar. If there is no default value specified, default value of
See documentation for properties of ChartScrollbarSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/ChartScrollbarSettings
Scrollbar
class will be used.
See documentation for properties of ChartScrollbarSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/ChartScrollbarSettings
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetColor()
getGraph()
setAutoGridCount
(Boolean autoGridCount) Set autoGridCount to false if you don't want that the number of gridCount will be specified automatically, according to the axis size.@Max(1L) @Min(0L) ChartScrollbarSettings
setBackgroundAlpha
(Double backgroundAlpha) Sets background opacity.setBackgroundColor
(Color backgroundColor) Sets background color of the scrollbar.Sets text color.setDragIconHeight
(Integer dragIconHeight) Sets height of resize grip image.setDragIconWidth
(Integer dragIconWidth) Sets width of resize grip image.setEnabled
(Boolean enabled) Set enabled false if you don't need scrollbar.setFontSize
(Integer fontSize) Sets font sizeSets graph which will be displayed in the scrollbar.@Max(1L) @Min(0L) ChartScrollbarSettings
setGraphFillAlpha
(Double graphFillAlpha) Sets graph fill opacity.setGraphFillColor
(Color graphFillColor) Sets graph fill color.@Max(1L) @Min(0L) ChartScrollbarSettings
setGraphLineAlpha
(Double graphLineAlpha) Sets graph line opacity.setGraphLineColor
(Color graphLineColor) Sets graph line color.setGraphType
(GraphType graphType) Sets type of chart scrollbar's graph.@Max(1L) @Min(0L) ChartScrollbarSettings
setGridAlpha
(Double gridAlpha) Sets grid opacity.setGridColor
(Color gridColor) Sets grid color.setGridCount
(Integer gridCount) Sets grid count.Sets height of scrollbar, in pixels.setHideResizeGrips
(Boolean hideResizeGrips) Set hideResizeGrips to true if resize grips should be hidden when the mouse is away from the scrollbar.setMarkPeriodChange
(Boolean markPeriodChange) Specifies if category axis of scrollbar should mark period change with a different date format.setPosition
(ChartScrollbarPosition position) Sets position of a scrollbar.setResizeEnabled
(Boolean resizeEnabled) Set resizeEnabled to false if you want to disable a resizing.setScrollDuration
(Double scrollDuration) Sets duration of scrolling, when the user clicks on scrollbar's background, in seconds.@Max(1L) @Min(0L) ChartScrollbarSettings
setSelectedBackgroundAlpha
(Double selectedBackgroundAlpha) Sets selected background opacity.setSelectedBackgroundColor
(Color selectedBackgroundColor) Sets selected background color.@Max(1L) @Min(0L) ChartScrollbarSettings
setSelectedGraphFillAlpha
(Double selectedGraphFillAlpha) Sets selected graph's fill opacity.setSelectedGraphFillColor
(Color selectedGraphFillColor) Sets selected graph's fill color.@Max(1L) @Min(0L) ChartScrollbarSettings
setSelectedGraphLineAlpha
(Double selectedGraphLineAlpha) Sets selected graph's line opacity.setSelectedGraphLineColor
(Color selectedGraphLineColor) Sets selected graph's line color.setUpdateOnReleaseOnly
(Boolean updateOnReleaseOnly) Set updateOnReleaseOnly to true if the chart should be updated only at the moment when user releases mouse button.setUsePeriod
(String usePeriod) Sets the date period for the scrollbar.
-
Constructor Details
-
ChartScrollbarSettings
public ChartScrollbarSettings()
-
-
Method Details
-
getAutoGridCount
- Returns:
- true if number of gridCount is specified automatically, according to the axis size
-
setAutoGridCount
@StudioProperty(defaultValue="true") public ChartScrollbarSettings setAutoGridCount(Boolean autoGridCount) Set autoGridCount to false if you don't want that the number of gridCount will be specified automatically, according to the axis size. If not set the default value is true.- Parameters:
autoGridCount
- autoGridCount option- Returns:
- chart scrollbar settings
-
getBackgroundAlpha
- Returns:
- background opacity
-
setBackgroundAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartScrollbarSettings setBackgroundAlpha(Double backgroundAlpha) Sets background opacity.- Parameters:
backgroundAlpha
- background opacity- Returns:
- chart scrollbar settings
-
getBackgroundColor
- Returns:
- background color of the scrollbar
-
setBackgroundColor
@StudioProperty(type=OPTIONS) public ChartScrollbarSettings setBackgroundColor(Color backgroundColor) Sets background color of the scrollbar.- Parameters:
backgroundColor
- background color- Returns:
- chart scrollbar settings
-
getColor
- Returns:
- text color
-
setColor
Sets text color.- Parameters:
color
- text color- Returns:
- chart scrollbar settings
-
getDragIconHeight
- Returns:
- height of resize grip image
-
setDragIconHeight
@StudioProperty(defaultValue="18") public ChartScrollbarSettings setDragIconHeight(Integer dragIconHeight) Sets height of resize grip image. Note, you should also update the image in amcharts/images folder if you don't want it to be distorted because of resizing. If not set the default value is 18.- Parameters:
dragIconHeight
- icon height- Returns:
- chart scrollbar settings
-
getDragIconWidth
- Returns:
- width of resize grip image
-
setDragIconWidth
@StudioProperty(defaultValue="11") public ChartScrollbarSettings setDragIconWidth(Integer dragIconWidth) Sets width of resize grip image. Note, you should also update the image in amcharts/images folder if you don't want it to be distorted because of resizing. If not set the default value is 11.- Parameters:
dragIconWidth
- icon width- Returns:
- chart scrollbar settings
-
getEnabled
- Returns:
- enabled option
-
setEnabled
Set enabled false if you don't need scrollbar. If not set the default value is true.- Parameters:
enabled
- enabled option- Returns:
- chart scrollbar settings
-
getFontSize
- Returns:
- font size
-
setFontSize
Sets font size- Parameters:
fontSize
- font size- Returns:
- chart scrollbar settings
-
getGraph
- Returns:
- graph id
-
setGraph
Sets graph which will be displayed in the scrollbar.- Parameters:
graph
- graph id- Returns:
- chart scrollbar settings
-
getGraphFillAlpha
- Returns:
- graph fill opacity
-
setGraphFillAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartScrollbarSettings setGraphFillAlpha(Double graphFillAlpha) Sets graph fill opacity.- Parameters:
graphFillAlpha
- graph fill opacity- Returns:
- chart scrollbar settings
-
getGraphFillColor
- Returns:
- graph fill color
-
setGraphFillColor
Sets graph fill color.- Parameters:
graphFillColor
- graph fill color- Returns:
- chart scrollbar settings
-
getGraphLineAlpha
- Returns:
- graph line opacity
-
setGraphLineAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartScrollbarSettings setGraphLineAlpha(Double graphLineAlpha) Sets graph line opacity.- Parameters:
graphLineAlpha
- graph line opacity- Returns:
- chart scrollbar settings
-
getGraphLineColor
- Returns:
- graph line color
-
setGraphLineColor
Sets graph line color.- Parameters:
graphLineColor
- graph line color- Returns:
- chart scrollbar settings
-
getGraphType
- Returns:
- graph type
-
setGraphType
Sets type of chart scrollbar's graph. By default the graph type is the same as the original graph's type, however in case of candlestick or ohlc you might want to show line graph in the scrollbar. Possible values are: line, column, step, smoothedLine, candlestick, ohlc.- Parameters:
graphType
- graph type- Returns:
- chart scrollbar settings
-
getGridAlpha
- Returns:
- grid opacity
-
setGridAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartScrollbarSettings setGridAlpha(Double gridAlpha) Sets grid opacity.- Parameters:
gridAlpha
- grid opacity- Returns:
- chart scrollbar settings
-
getGridColor
- Returns:
- grid color
-
setGridColor
Sets grid color.- Parameters:
gridColor
- grid color- Returns:
- chart scrollbar settings
-
getGridCount
- Returns:
- grid count
-
setGridCount
Sets grid count. You should set autoGridCount to false in order this property to work.- Parameters:
gridCount
- grid count- Returns:
- chart scrollbar settings
-
getHeight
- Returns:
- height of scrollbar, in pixels.
-
setHeight
Sets height of scrollbar, in pixels. If not set the default value is 40.- Parameters:
height
- height, in pixels- Returns:
- chart scrollbar settings
-
getHideResizeGrips
- Returns:
- true if resize grips are hidden when the mouse is away from the scrollbar
-
setHideResizeGrips
@StudioProperty(defaultValue="false") public ChartScrollbarSettings setHideResizeGrips(Boolean hideResizeGrips) Set hideResizeGrips to true if resize grips should be hidden when the mouse is away from the scrollbar. If not set the default value is false.- Parameters:
hideResizeGrips
- hideResizeGrips option- Returns:
- chart scrollbar settings
-
getMarkPeriodChange
- Returns:
- true if markPeriodChange is enabled
-
setMarkPeriodChange
Specifies if category axis of scrollbar should mark period change with a different date format.- Parameters:
markPeriodChange
- markPeriodChange option- Returns:
- chart scrollbar settings
-
getPosition
- Returns:
- position of a scrollbar
-
setPosition
@StudioProperty(type=ENUMERATION, defaultValue="BOTTOM") public ChartScrollbarSettings setPosition(ChartScrollbarPosition position) Sets position of a scrollbar. Possible values are "top" and "bottom". If not set the default value is BOTTOM.- Parameters:
position
- position of a scrollbar- Returns:
- chart scrollbar settings
-
getResizeEnabled
- Returns:
- true if resizing is enabled
-
setResizeEnabled
@StudioProperty(defaultValue="true") public ChartScrollbarSettings setResizeEnabled(Boolean resizeEnabled) Set resizeEnabled to false if you want to disable a resizing. If not set the default value is true.- Parameters:
resizeEnabled
- resizeEnabled option- Returns:
- chart scrollbar settings
-
getScrollDuration
- Returns:
- duration of scrolling, in seconds
-
setScrollDuration
@StudioProperty(defaultValue="true") public ChartScrollbarSettings setScrollDuration(Double scrollDuration) Sets duration of scrolling, when the user clicks on scrollbar's background, in seconds. Note, updateOnReleaseOnly should be set to false in order animation to happen. If not set the default value is true.- Parameters:
scrollDuration
- duration of scrolling, in seconds- Returns:
- chart scrollbar settings
-
getSelectedBackgroundAlpha
- Returns:
- selected background opacity
-
setSelectedBackgroundAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartScrollbarSettings setSelectedBackgroundAlpha(Double selectedBackgroundAlpha) Sets selected background opacity.- Parameters:
selectedBackgroundAlpha
- opacity- Returns:
- chart scrollbar settings
-
getSelectedBackgroundColor
- Returns:
- selected background color
-
setSelectedBackgroundColor
@StudioProperty(type=OPTIONS) public ChartScrollbarSettings setSelectedBackgroundColor(Color selectedBackgroundColor) Sets selected background color.- Parameters:
selectedBackgroundColor
- color- Returns:
- chart scrollbar settings
-
getSelectedGraphFillAlpha
- Returns:
- selected graph's fill opacity
-
setSelectedGraphFillAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartScrollbarSettings setSelectedGraphFillAlpha(Double selectedGraphFillAlpha) Sets selected graph's fill opacity.- Parameters:
selectedGraphFillAlpha
- opacity- Returns:
- chart scrollbar settings
-
getSelectedGraphFillColor
- Returns:
- selected graph's fill color
-
setSelectedGraphFillColor
@StudioProperty(type=OPTIONS) public ChartScrollbarSettings setSelectedGraphFillColor(Color selectedGraphFillColor) Sets selected graph's fill color.- Parameters:
selectedGraphFillColor
- color- Returns:
- chart scrollbar settings
-
getSelectedGraphLineAlpha
- Returns:
- selected graph'sline opacity
-
setSelectedGraphLineAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartScrollbarSettings setSelectedGraphLineAlpha(Double selectedGraphLineAlpha) Sets selected graph's line opacity.- Parameters:
selectedGraphLineAlpha
- opacity- Returns:
- chart scrollbar settings
-
getSelectedGraphLineColor
- Returns:
- selected graph's line color
-
setSelectedGraphLineColor
@StudioProperty(type=OPTIONS) public ChartScrollbarSettings setSelectedGraphLineColor(Color selectedGraphLineColor) Sets selected graph's line color.- Parameters:
selectedGraphLineColor
- color- Returns:
- chart scrollbar settings
-
getUpdateOnReleaseOnly
- Returns:
- true if the chart is updated only at the moment when user releases mouse button
-
setUpdateOnReleaseOnly
Set updateOnReleaseOnly to true if the chart should be updated only at the moment when user releases mouse button. Useful when working with large data sets.- Parameters:
updateOnReleaseOnly
- updateOnReleaseOnly option- Returns:
- chart scrollbar settings
-
getUsePeriod
- Returns:
- used date period
-
setUsePeriod
Sets the date period for the scrollbar. This is very important feature for those, who work with large data sets. You can tell scrollbar what period it should use for it's graph and save a lot of time for rendering of this graph. For example, if your minPeriod is "DD" (days), set usePeriod = "WW" (weeks) and you will have 7 times less data points in scrollbar's graph. Note, the period you specify here should be set inCategoryAxesSettings.groupToPeriods
.- Parameters:
usePeriod
- date period- Returns:
- chart scrollbar settings
-