Package io.jmix.charts.model.axis
Class ValueAxesSettings
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.axis.ValueAxesSettings
- All Implemented Interfaces:
Serializable
Defines set of properties for all
ValueAxis
. If there is no default value specified, default value of
ValueAxis
class will be used.
See documentation for properties of ValueAxesSettings
JS object.
http://docs.amcharts.com/3/javascriptstockchart/ValueAxesSettings
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetColor()
getUnit()
setAutoGridCount
(Boolean autoGridCount) Set autoGridCount to false the number for gridCount shouldn't be specified automatically, according to the axis size.@Max(1L) @Min(0L) ValueAxesSettings
setAxisAlpha
(Double axisAlpha) Sets axis opacity.setAxisColor
(Color axisColor) Sets axis color.setAxisThickness
(Integer axisThickness) Sets thickness of the axis.Setslabel
color.setDashLength
(Integer dashLength) Sets length of a dash.@Max(1L) @Min(0L) ValueAxesSettings
setFillAlpha
(Double fillAlpha) Sets fill opacity.setFillColor
(Color fillColor) Sets fill color.@Max(1L) @Min(0L) ValueAxesSettings
setGridAlpha
(Double gridAlpha) Sets opacity of grid lines.setGridColor
(Color gridColor) Sets color of grid lines.setGridCount
(Integer gridCount) Sets approximate number of grid lines.setGridThickness
(Integer gridThickness) Sets thickness of grid lines.setIncludeGuidesInMinMax
(Boolean includeGuidesInMinMax) Specifies whether guide values should be included when calculating minimum and maximum of the axis.setIncludeHidden
(Boolean includeHidden) Specifies whether the axis should include hidden graphs when calculating minimum and maximum values.Set inside to false if values should be placed inside plot area.setIntegersOnly
(Boolean integersOnly) Specifies whether values on axis can only be integers or both integers and doubles.setLabelFrequency
(Double labelFrequency) Sets frequency at which labels should be placed.setLabelOffset
(Integer labelOffset) Sets label offset.setLabelsEnabled
(Boolean labelsEnabled) Set labelsEnabled to false if value labels shouldn't be displayed.setLogarithmic
(Boolean logarithmic) Set logarithmic to true if value axis is logarithmic.setMaximum
(Double maximum) Set maximum value if you don't want maximum value to be calculated by the chart.setMinimum
(Double minimum) Set minimum value if you don't want minimum value to be calculated by the chart.setMinMaxMultiplier
(Double minMaxMultiplier) Sets minimum and maximum multiplier.@Max(1L) @Min(0L) ValueAxesSettings
setMinorGridAlpha
(Double minorGridAlpha) Sets opacity of minor grid.setMinorGridEnabled
(Boolean minorGridEnabled) Specifies if minor grid should be displayed.setMinVerticalGap
(Integer minVerticalGap) Sets minimum vertical gap.Sets the distance of the axis to the plot area, in pixels.setPosition
(ValueAxisPosition position) Sets position of the value axis.setPrecision
(Integer precision) Sets precision (number of decimals) of values.setReversed
(Boolean reversed) Set reversed to true if value axis should be reversed (smaller values on top).setShowFirstLabel
(Boolean showFirstLabel) Set showFirstLabel to false if first label of value axis shouldn't be displayed.setShowLastLabel
(Boolean showLastLabel) Set showLastLabel to true if last label of value axis should be displayed.setStackType
(StackType stackType) Sets stacking mode of the axis.setStrictMinMax
(Boolean strictMinMax) If you set minimum and maximum for your axis, chart adjusts them so that grid would start and end on the beginning and end of plot area and grid would be at equal intervals.setTickLength
(Integer tickLength) Sets tick length.Sets unit which will be added to the value label.setUnitPosition
(UnitPosition unitPosition) Sets position of the unit.
-
Constructor Details
-
ValueAxesSettings
public ValueAxesSettings()
-
-
Method Details
-
getAutoGridCount
- Returns:
- true if the number for gridCount is specified automatically, according to the axis size
-
setAutoGridCount
@StudioProperty(defaultValue="true") public ValueAxesSettings setAutoGridCount(Boolean autoGridCount) Set autoGridCount to false the number for gridCount shouldn't be specified automatically, according to the axis size. If not set the default value is true.- Parameters:
autoGridCount
- autoGridCount option- Returns:
- value axes settings
-
getAxisAlpha
- Returns:
- axis opacity
-
setAxisAlpha
@StudioProperty(defaultValue="0") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ValueAxesSettings setAxisAlpha(Double axisAlpha) Sets axis opacity. If not set the default value is 0.- Parameters:
axisAlpha
- opacity- Returns:
- value axes settings
-
getAxisColor
- Returns:
- axis color
-
setAxisColor
Sets axis color.- Parameters:
axisColor
- color- Returns:
- value axes settings
-
getAxisThickness
- Returns:
- thickness of the axis
-
setAxisThickness
Sets thickness of the axis.- Parameters:
axisThickness
- thickness- Returns:
- value axes settings
-
getColor
- Returns:
label
color
-
setColor
Setslabel
color.- Parameters:
color
- color- Returns:
- value axes settings
-
getDashLength
- Returns:
- length of a dash
-
setDashLength
Sets length of a dash. By default, the grid line is not dashed.- Parameters:
dashLength
- dash length- Returns:
- value axes settings
-
getFillAlpha
- Returns:
- fill opacity
-
setFillAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ValueAxesSettings setFillAlpha(Double fillAlpha) Sets fill opacity. Every second space between grid lines can be filled with color.- Parameters:
fillAlpha
- opacity- Returns:
- value axes settings
-
getFillColor
- Returns:
- fill color
-
setFillColor
Sets fill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills.- Parameters:
fillColor
- color- Returns:
- value axes settings
-
getGridAlpha
- Returns:
- opacity of grid lines
-
setGridAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ValueAxesSettings setGridAlpha(Double gridAlpha) Sets opacity of grid lines.- Parameters:
gridAlpha
- opacity- Returns:
- value axes settings
-
getGridColor
- Returns:
- color of grid lines
-
setGridColor
Sets color of grid lines.- Parameters:
gridColor
- color- Returns:
- value axes settings
-
getGridThickness
- Returns:
- thickness of grid lines
-
setGridThickness
Sets thickness of grid lines.- Parameters:
gridThickness
- thickness- Returns:
- value axes settings
-
getIncludeGuidesInMinMax
- Returns:
- true if includeGuidesInMinMax is enabled
-
setIncludeGuidesInMinMax
Specifies whether guide values should be included when calculating minimum and maximum of the axis.- Parameters:
includeGuidesInMinMax
- includeGuidesInMinMax option- Returns:
- value axes settings
-
getIncludeHidden
- Returns:
- true if includeHidden is enabled
-
setIncludeHidden
Specifies whether the axis should include hidden graphs when calculating minimum and maximum values.- Parameters:
includeHidden
- includeHidden option- Returns:
- value axes settings
-
getInside
- Returns:
- true if values is placed inside plot area
-
setInside
Set inside to false if values should be placed inside plot area. In case you set this to false, you'll have to adjustPanelsSettings.marginLeft
orPanelsSettings.marginRight
in order labels to be visible. Note, if you set this property to false, you might also consider setting showLastLabel to true. If not set the default value is true.- Parameters:
inside
- inside option- Returns:
- value axes settings
-
getIntegersOnly
- Returns:
- true if integersOnly is enabled
-
setIntegersOnly
Specifies whether values on axis can only be integers or both integers and doubles.- Parameters:
integersOnly
- integersOnly option- Returns:
- value axes settings
-
getLabelFrequency
- Returns:
- frequency at which labels is placed
-
setLabelFrequency
Sets frequency at which labels should be placed.- Parameters:
labelFrequency
- label frequency- Returns:
- value axes settings
-
getLabelOffset
- Returns:
- label offset
-
setLabelOffset
Sets label offset. You can use it to adjust position of axis labels. If not set the default value is 0.- Parameters:
labelOffset
- label offset- Returns:
- value axes settings
-
getLabelsEnabled
- Returns:
- true if value labels is displayed
-
setLabelsEnabled
Set labelsEnabled to false if value labels shouldn't be displayed.- Parameters:
labelsEnabled
- labelsEnabled option- Returns:
- value axes settings
-
getLogarithmic
- Returns:
- true if value axis is logarithmic
-
setLogarithmic
Set logarithmic to true if value axis is logarithmic.- Parameters:
logarithmic
- logarithmic option- Returns:
- value axes settings
-
getMaximum
- Returns:
- maximum value
-
setMaximum
Set maximum value if you don't want maximum value to be calculated by the chart. This value might still be adjusted so that it would be possible to draw grid at rounded intervals.- Parameters:
maximum
- maximum value- Returns:
- value axes settings
-
getMinimum
- Returns:
- minimum value
-
setMinimum
Set minimum value if you don't want minimum value to be calculated by the chart. This value might still be adjusted so that it would be possible to draw grid at rounded intervals.- Parameters:
minimum
- minimum value- Returns:
- value axes settings
-
getMinMaxMultiplier
- Returns:
- minimum and maximum multiplier
-
setMinMaxMultiplier
Sets minimum and maximum multiplier. If set value axis scale (min and max numbers) will be multiplied by it. I.e. if set to 1.2 the scope of values will increase by 20%.- Parameters:
minMaxMultiplier
- minimum and maximum multiplier- Returns:
- value axes settings
-
getOffset
- Returns:
- the distance of the axis to the plot area, in pixels
-
setOffset
Sets the distance of the axis to the plot area, in pixels. Useful if you have more then one axis on the same side.- Parameters:
offset
- offset- Returns:
- value axes settings
-
getPosition
- Returns:
- position of the value axis
-
setPosition
Sets position of the value axis. Possible values are "left" and "right".- Parameters:
position
- position- Returns:
- value axes settings
-
getReversed
- Returns:
- true if value axis is reversed
-
setReversed
Set reversed to true if value axis should be reversed (smaller values on top).- Parameters:
reversed
- reversed option- Returns:
- value axes settings
-
getShowFirstLabel
- Returns:
- true if first label of value axis is displayed
-
setShowFirstLabel
@StudioProperty(defaultValue="true") public ValueAxesSettings setShowFirstLabel(Boolean showFirstLabel) Set showFirstLabel to false if first label of value axis shouldn't be displayed. If not set the default value is true.- Parameters:
showFirstLabel
- showFirstLabel option- Returns:
- value axes settings
-
getShowLastLabel
- Returns:
- true if last label of value axis is displayed
-
setShowLastLabel
@StudioProperty(defaultValue="false") public ValueAxesSettings setShowLastLabel(Boolean showLastLabel) Set showLastLabel to true if last label of value axis should be displayed. If not set the default value is false.- Parameters:
showLastLabel
- showLastLabel option- Returns:
- value axes settings
-
getStackType
- Returns:
- stacking mode of the axis
-
setStackType
Sets stacking mode of the axis. Possible values are: "none", "regular", "100%", "3d".- Parameters:
stackType
- stack type- Returns:
- value axes settings
-
getTickLength
- Returns:
- tick length
-
setTickLength
Sets tick length. If not set the default value is 0.- Parameters:
tickLength
- tick length- Returns:
- value axes settings
-
getUnit
- Returns:
- unit which is added to the value label
-
setUnit
Sets unit which will be added to the value label.- Parameters:
unit
- unit- Returns:
- value axes settings
-
getUnitPosition
- Returns:
- position of the unit
-
setUnitPosition
@StudioProperty(type=ENUMERATION) public ValueAxesSettings setUnitPosition(UnitPosition unitPosition) Sets position of the unit. Possible values are "left" or "right".- Parameters:
unitPosition
- unit position- Returns:
- value axes settings
-
getGridCount
- Returns:
- approximate number of grid lines
-
setGridCount
Sets approximate number of grid lines. autoGridCount should be set to false, otherwise this property will be ignored.- Parameters:
gridCount
- grid count- Returns:
- value axes settings
-
getMinorGridAlpha
- Returns:
- opacity of minor grid
-
setMinorGridAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ValueAxesSettings setMinorGridAlpha(Double minorGridAlpha) Sets opacity of minor grid. In order minor to be visible, you should set minorGridEnabled to true.- Parameters:
minorGridAlpha
- opacity- Returns:
- value axes settings
-
getMinorGridEnabled
- Returns:
- true if minor grid is enabled
-
setMinorGridEnabled
Specifies if minor grid should be displayed. Note, if equalSpacing is set to true, this setting will be ignored.- Parameters:
minorGridEnabled
- minorGridEnabled option- Returns:
- value axes settings
-
getMinVerticalGap
- Returns:
- minimum vertical gap
-
setMinVerticalGap
Sets minimum vertical gap. This property is used when calculating grid count (when autoGridCount is true). It specifies minimum cell height required for one span between grid lines.- Parameters:
minVerticalGap
- minimum vertical gap- Returns:
- value axes settings
-
getPrecision
- Returns:
- precision (number of decimals) of values
-
setPrecision
Sets precision (number of decimals) of values.- Parameters:
precision
- precision- Returns:
- value axes settings
-
getStrictMinMax
- Returns:
- true if the chart doesn't adjust minimum and maximum of value axis
-
setStrictMinMax
If you set minimum and maximum for your axis, chart adjusts them so that grid would start and end on the beginning and end of plot area and grid would be at equal intervals. Set strictMinMax to true, if the chart shouldn't adjust minimum and maximum of value axis.- Parameters:
strictMinMax
- strictMinMax option- Returns:
- value axes settings
-