Package io.jmix.charts.model
Class GaugeAxis
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.GaugeAxis
- All Implemented Interfaces:
Serializable
Creates an axis for
See documentation for properties of GaugeAxis JS Object.
http://docs.amcharts.com/3/javascriptcharts/GaugeAxis
AngularGaugeChart
charts, multiple can be assigned.
See documentation for properties of GaugeAxis JS Object.
http://docs.amcharts.com/3/javascriptcharts/GaugeAxis
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds bands.getBands()
getColor()
getId()
getUnit()
@Max(1L) @Min(0L) GaugeAxis
setAxisAlpha
(Double axisAlpha) Sets axis opacity.setAxisColor
(Color axisColor) Sets axis color.setAxisThickness
(Integer axisThickness) Sets thickness of the axis outline.@Max(1L) @Min(0L) GaugeAxis
setBandAlpha
(Double bandAlpha) Sets opacity of band fills.setBandGradientRatio
(List<Float> bandGradientRatio) Sets list of gradient ratio.@Max(1L) @Min(0L) GaugeAxis
setBandOutlineAlpha
(Double bandOutlineAlpha) Sets opacity of band outlines.setBandOutlineColor
(Color bandOutlineColor) Sets color of band outlines.setBandOutlineThickness
(Integer bandOutlineThickness) Sets thickness of band outlines.Sets list of bands.setBottomText
(String bottomText) Sets text displayed below the axis center.setBottomTextBold
(Boolean bottomTextBold) Set bottomTextBold to false if text shouldn't be bold.setBottomTextColor
(Color bottomTextColor) Sets bottom text color.setBottomTextFontSize
(Integer bottomTextFontSize) Sets font size of bottom text.setBottomTextYOffset
(Integer bottomTextYOffset) Sets Y offset of bottom text.setCenterX
(String centerX) Sets X position of the axis, relative to the center of the gauge.setCenterY
(String centerY) Sets Y position of the axis, relative to the center of the gauge.Sets labels color of the axis.@Max(180L) @Min(-180L) GaugeAxis
setEndAngle
(Integer endAngle) Sets axis end angle.setEndValue
(Double endValue) Sets axis end (maximum) value.setFontSize
(Integer fontSize) Sets font size for axis labels.setGridCount
(Integer gridCount) Sets number of grid lines.setGridInside
(Boolean gridInside) Set gridInside to false if grid shouldn't be drawn inside the axis.Sets unique id of an axis.Set inside to false if labels should be placed outside the axis.setLabelFrequency
(Double labelFrequency) Sets frequency of labels.setLabelFunction
(JsFunction labelFunction) Sets JS function to format axis labels.setLabelOffset
(Integer labelOffset) Sets distance from axis to the labels.setLabelsEnabled
(Boolean labelsEnabled) Sets labelsEnabled to false if labels on the axis shouldn't be shown.setMinorTickInterval
(Double minorTickInterval) Sets interval, at which minor ticks should be placed.setMinorTickLength
(Integer minorTickLength) Sets length of a minor tick.Sets axis radius.setShowFirstLabel
(Boolean showFirstLabel) Set showFirstLabel to false if the first label shouldn't be shown.setShowLastLabel
(Boolean showLastLabel) Set showLastLabel to false if the last label shouldn't be shown.@Max(180L) @Min(-180L) GaugeAxis
setStartAngle
(Integer startAngle) Sets axis start angle.setStartValue
(Double startValue) Sets axis start (minimum) value.@Max(1L) @Min(0L) GaugeAxis
setTickAlpha
(Double tickAlpha) Sets opacity of axis ticks.setTickColor
(Color tickColor) Sets color of axis ticks.setTickLength
(Integer tickLength) Sets length of a major tick.setTickThickness
(Integer tickThickness) Sets tick thickness.setTopText
(String topText) Sets text displayed above the axis center.setTopTextBold
(Boolean topTextBold) Sets topTextBold to false if text shouldn't be bold.setTopTextColor
(Color topTextColor) Sets color of top text.setTopTextFontSize
(Integer topTextFontSize) Sets font size of top text.setTopTextYOffset
(Integer topTextYOffset) Sets Y offset of top text.Sets a string which can be placed next to axis labels.setUnitPosition
(UnitPosition unitPosition) Sets position of the unit.setUsePrefixes
(Boolean usePrefixes) Set usePrefixes to true if small and big numbers should use prefixes to make them more readable.setValueInterval
(Integer valueInterval) Sets interval, at which ticks with values should be placed.
-
Constructor Details
-
GaugeAxis
public GaugeAxis()
-
-
Method Details
-
getAxisAlpha
- Returns:
- axis opacity
-
setAxisAlpha
@StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) GaugeAxis setAxisAlpha(Double axisAlpha) Sets axis opacity. If not set the default value is 1.- Parameters:
axisAlpha
- opacity- Returns:
- gauge axis
-
getAxisColor
- Returns:
- axis color
-
setAxisColor
@StudioProperty(type=OPTIONS, defaultValue="#000000") public GaugeAxis setAxisColor(Color axisColor) Sets axis color. If not set the default value is #000000.- Parameters:
axisColor
- color- Returns:
- gauge axis
-
getAxisThickness
- Returns:
- thickness of the axis outline
-
setAxisThickness
Sets thickness of the axis outline. If not set the default value is 1.- Parameters:
axisThickness
- axis thickness- Returns:
- gauge axis
-
getBandAlpha
- Returns:
- opacity of band fills
-
setBandAlpha
@StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) GaugeAxis setBandAlpha(Double bandAlpha) Sets opacity of band fills. If not set the default value is 1.- Parameters:
bandAlpha
- opacity- Returns:
- gauge axis
-
getBandOutlineAlpha
- Returns:
- opacity of band outlines
-
setBandOutlineAlpha
@StudioProperty(defaultValue="0") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) GaugeAxis setBandOutlineAlpha(Double bandOutlineAlpha) Sets opacity of band outlines. If not set the default value is 0.- Parameters:
bandOutlineAlpha
- opacity- Returns:
- gauge axis
-
getBandOutlineColor
- Returns:
- color of band outlines
-
setBandOutlineColor
@StudioProperty(type=OPTIONS, defaultValue="#000000") public GaugeAxis setBandOutlineColor(Color bandOutlineColor) Sets color of band outlines. If not set the default value is #000000.- Parameters:
bandOutlineColor
- color- Returns:
- gauge axis
-
getBandOutlineThickness
- Returns:
- thickness of band outlines
-
setBandOutlineThickness
@StudioProperty(defaultValue="0") public GaugeAxis setBandOutlineThickness(Integer bandOutlineThickness) Sets thickness of band outlines. If not set the default value is 0.- Parameters:
bandOutlineThickness
- thickness- Returns:
- gauge axis
-
getBottomText
- Returns:
- text displayed below the axis center
-
setBottomText
Sets text displayed below the axis center.- Parameters:
bottomText
- bottom text- Returns:
- gauge axis
-
getBottomTextBold
- Returns:
- true if text is bold
-
setBottomTextBold
Set bottomTextBold to false if text shouldn't be bold. If not set the default value is true.- Parameters:
bottomTextBold
- bottomTextBold option- Returns:
- gauge axis
-
getBottomTextColor
- Returns:
- bottom text color
-
setBottomTextColor
Sets bottom text color.- Parameters:
bottomTextColor
- color- Returns:
- gauge axis
-
getBottomTextFontSize
- Returns:
- font size of bottom text
-
setBottomTextFontSize
Sets font size of bottom text.- Parameters:
bottomTextFontSize
- font size- Returns:
- gauge axis
-
getBottomTextYOffset
- Returns:
- Y offset of bottom text
-
setBottomTextYOffset
Sets Y offset of bottom text. If not set the default value is 0.- Parameters:
bottomTextYOffset
- Y offset- Returns:
- gauge axis
-
getCenterX
- Returns:
- X position of the axis, relative to the center of the gauge
-
setCenterX
Sets X position of the axis, relative to the center of the gauge. If not set the default value is 0%.- Parameters:
centerX
- X position of the axis- Returns:
- gauge axis
-
getCenterY
- Returns:
- Y position of the axis, relative to the center of the gauge
-
setCenterY
Sets Y position of the axis, relative to the center of the gauge. If not set the default value is 0%.- Parameters:
centerY
- Y position of the axis- Returns:
- gauge axis
-
getEndAngle
- Returns:
- axis end angle
-
setEndAngle
@StudioProperty(defaultValue="120") @Max(180L) @Min(-180L) public @Max(180L) @Min(-180L) GaugeAxis setEndAngle(Integer endAngle) Sets axis end angle. Valid values are from - 180 to 180. If not set the default value is 120.- Parameters:
endAngle
- angle- Returns:
- gauge axis
-
getEndValue
- Returns:
- axis end (maximum) value
-
setEndValue
Sets axis end (maximum) value.- Parameters:
endValue
- end value- Returns:
- gauge axis
-
getGridInside
- Returns:
- true if grid is drawn inside the axis
-
setGridInside
Set gridInside to false if grid shouldn't be drawn inside the axis. If not set the default value is true.- Parameters:
gridInside
- gridInside option- Returns:
- gauge axis
-
getInside
- Returns:
- true if labels is placed inside the axis
-
setInside
Set inside to false if labels should be placed outside the axis. If not set the default value is true.- Parameters:
inside
- inside option- Returns:
- gauge axis
-
getLabelFrequency
- Returns:
- frequency of labels
-
setLabelFrequency
Sets frequency of labels. If not set the default value is 1.- Parameters:
labelFrequency
- frequency- Returns:
- gauge axis
-
getLabelOffset
- Returns:
- distance from axis to the labels
-
setLabelOffset
Sets distance from axis to the labels. If not set the default value is 15.- Parameters:
labelOffset
- label offset- Returns:
- gauge axis
-
getMinorTickInterval
- Returns:
- interval, at which minor ticks is placed
-
setMinorTickInterval
Sets interval, at which minor ticks should be placed.- Parameters:
minorTickInterval
- minor tick interval- Returns:
- gauge axis
-
getMinorTickLength
- Returns:
- length of a minor tick
-
setMinorTickLength
Sets length of a minor tick. If not set the default value is 5.- Parameters:
minorTickLength
- length- Returns:
- gauge axis
-
getRadius
- Returns:
- axis radius
-
setRadius
Sets axis radius. If not set the default value is 95%.- Parameters:
radius
- radius- Returns:
- gauge axis
-
getShowFirstLabel
- Returns:
- true if the first label is shown
-
setShowFirstLabel
Set showFirstLabel to false if the first label shouldn't be shown. If not set the default value is true.- Parameters:
showFirstLabel
- showFirstLabel option- Returns:
- gauge axis
-
getShowLastLabel
- Returns:
- true if the last label is shown
-
setShowLastLabel
Set showLastLabel to false if the last label shouldn't be shown. If not set the default value is true.- Parameters:
showLastLabel
- showLastLabel option- Returns:
- gauge axis
-
getStartAngle
- Returns:
- axis start angle
-
setStartAngle
@StudioProperty(defaultValue="-120") @Max(180L) @Min(-180L) public @Max(180L) @Min(-180L) GaugeAxis setStartAngle(Integer startAngle) Sets axis start angle. Valid values are from - 180 to 180. If not set the default value is -120.- Parameters:
startAngle
- start angle- Returns:
- gauge axis
-
getStartValue
- Returns:
- axis start (minimum) value
-
setStartValue
Sets axis start (minimum) value. If not set the default value is 0.- Parameters:
startValue
- start value- Returns:
- gauge axis
-
getTickAlpha
- Returns:
- opacity of axis ticks
-
setTickAlpha
@StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) GaugeAxis setTickAlpha(Double tickAlpha) Sets opacity of axis ticks. If not set the default value is 1.- Parameters:
tickAlpha
- opacity- Returns:
- gauge axis
-
getTickColor
- Returns:
- color of axis ticks
-
setTickColor
@StudioProperty(type=OPTIONS, defaultValue="#555555") public GaugeAxis setTickColor(Color tickColor) Sets color of axis ticks. If not set the default value is #555555.- Parameters:
tickColor
- tick color- Returns:
- gauge axis
-
getTickLength
- Returns:
- length of a major tick
-
setTickLength
Sets length of a major tick. If not set the default value is 10.- Parameters:
tickLength
- tick length- Returns:
- gauge axis
-
getTickThickness
- Returns:
- tick thickness
-
setTickThickness
Sets tick thickness. If not set the default value is 1.- Parameters:
tickThickness
- tick thickness- Returns:
- gauge axis
-
getTopText
- Returns:
- text displayed above the axis center
-
setTopText
Sets text displayed above the axis center.- Parameters:
topText
- top text- Returns:
- gauge axis
-
getTopTextBold
- Returns:
- true if top text is bold
-
setTopTextBold
Sets topTextBold to false if text shouldn't be bold. If not set the default value is true.- Parameters:
topTextBold
- topTextBold option- Returns:
- gauge axis
-
getTopTextColor
- Returns:
- color of top text
-
setTopTextColor
Sets color of top text.- Parameters:
topTextColor
- color- Returns:
- gauge axis
-
getTopTextFontSize
- Returns:
- font size of top text
-
setTopTextFontSize
Sets font size of top text.- Parameters:
topTextFontSize
- font size- Returns:
- gauge axis
-
getTopTextYOffset
- Returns:
- Y offset of top text
-
setTopTextYOffset
Sets Y offset of top text. If not set the default value is 0.- Parameters:
topTextYOffset
- Y offset- Returns:
- gauge axis
-
getUnit
- Returns:
- string which is placed next to axis labels
-
setUnit
Sets a string which can be placed next to axis labels.- Parameters:
unit
- unit string- Returns:
- gauge axis
-
getUnitPosition
- Returns:
- position of the unit
-
setUnitPosition
@StudioProperty(type=ENUMERATION, defaultValue="RIGHT") public GaugeAxis setUnitPosition(UnitPosition unitPosition) Sets position of the unit. If not set the default value is RIGHT.- Parameters:
unitPosition
- unit position- Returns:
- gauge axis
-
getValueInterval
- Returns:
- value interval
-
setValueInterval
Sets interval, at which ticks with values should be placed.- Parameters:
valueInterval
- value interval- Returns:
- gauge axis
-
getBands
- Returns:
- list of bands
-
setBands
@StudioElementsGroup(caption="Bands", xmlElement="bands") public GaugeAxis setBands(List<GaugeBand> bands) Sets list of bands.- Parameters:
bands
- list of bands- Returns:
- gauge axis
-
addBands
Adds bands.- Parameters:
bands
- bands- Returns:
- gauge axis
-
getGridCount
- Returns:
- number of grid lines
-
setGridCount
Sets number of grid lines. Note, GaugeAxis doesn't adjust gridCount, so you should check your values and choose a proper gridCount which would result grids at round numbers. If not set the default value is 5.- Parameters:
gridCount
- number of grid lines- Returns:
- gauge axis
-
getId
- Returns:
- unique id of an axis
-
setId
Sets unique id of an axis.- Parameters:
id
- id- Returns:
- gauge axis
-
getLabelsEnabled
- Returns:
- true if labels on the axis is shown
-
setLabelsEnabled
Sets labelsEnabled to false if labels on the axis shouldn't be shown. If not set the default value is true.- Parameters:
labelsEnabled
- labelsEnabled option- Returns:
- gauge axis
-
getUsePrefixes
- Returns:
- if small and big numbers use prefixes
-
setUsePrefixes
Set usePrefixes to true if small and big numbers should use prefixes to make them more readable. If not set the default value is false.- Parameters:
usePrefixes
- usePrefixes option- Returns:
- gauge axis
-
getLabelFunction
- Returns:
- JS function to format axis labels
-
setLabelFunction
Sets JS function to format axis labels. This function is called and value is passed as a attribute: labelFunction(value);- Parameters:
labelFunction
- JS function- Returns:
- gauge axis
-
getColor
- Returns:
- labels color of the axis
-
setColor
Sets labels color of the axis.- Parameters:
color
- color- Returns:
- gauge axis
-
getFontSize
- Returns:
- font size for axis labels
-
setFontSize
Sets font size for axis labels.- Parameters:
fontSize
- font size- Returns:
- gauge axis
-
getBandGradientRatio
- Returns:
- list gradient ratios
-
setBandGradientRatio
Sets list of gradient ratio. Will make bands to be filled with color gradients. Negative value means the color will be darker than the original, and positive number means the color will be lighter.- Parameters:
bandGradientRatio
- list gradient ratios- Returns:
- gauge axis
-