Class GaugeAxis

All Implemented Interfaces:
Serializable

public class GaugeAxis extends AbstractChartObject
Creates an axis for AngularGaugeChart charts, multiple can be assigned.
See documentation for properties of GaugeAxis JS Object.
http://docs.amcharts.com/3/javascriptcharts/GaugeAxis
See Also:
  • Constructor Details

    • GaugeAxis

      public GaugeAxis()
  • Method Details

    • getAxisAlpha

      public Double 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

      public Color 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

      public Integer getAxisThickness()
      Returns:
      thickness of the axis outline
    • setAxisThickness

      @StudioProperty(defaultValue="1") public GaugeAxis setAxisThickness(Integer axisThickness)
      Sets thickness of the axis outline. If not set the default value is 1.
      Parameters:
      axisThickness - axis thickness
      Returns:
      gauge axis
    • getBandAlpha

      public Double 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

      public Double 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

      public Color 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

      public Integer 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

      public String getBottomText()
      Returns:
      text displayed below the axis center
    • setBottomText

      @StudioProperty public GaugeAxis setBottomText(String bottomText)
      Sets text displayed below the axis center.
      Parameters:
      bottomText - bottom text
      Returns:
      gauge axis
    • getBottomTextBold

      public Boolean getBottomTextBold()
      Returns:
      true if text is bold
    • setBottomTextBold

      @StudioProperty(defaultValue="true") public GaugeAxis setBottomTextBold(Boolean bottomTextBold)
      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

      public Color getBottomTextColor()
      Returns:
      bottom text color
    • setBottomTextColor

      @StudioProperty(type=OPTIONS) public GaugeAxis setBottomTextColor(Color bottomTextColor)
      Sets bottom text color.
      Parameters:
      bottomTextColor - color
      Returns:
      gauge axis
    • getBottomTextFontSize

      public Integer getBottomTextFontSize()
      Returns:
      font size of bottom text
    • setBottomTextFontSize

      @StudioProperty public GaugeAxis setBottomTextFontSize(Integer bottomTextFontSize)
      Sets font size of bottom text.
      Parameters:
      bottomTextFontSize - font size
      Returns:
      gauge axis
    • getBottomTextYOffset

      public Integer getBottomTextYOffset()
      Returns:
      Y offset of bottom text
    • setBottomTextYOffset

      @StudioProperty(defaultValue="0") public GaugeAxis setBottomTextYOffset(Integer bottomTextYOffset)
      Sets Y offset of bottom text. If not set the default value is 0.
      Parameters:
      bottomTextYOffset - Y offset
      Returns:
      gauge axis
    • getCenterX

      public String getCenterX()
      Returns:
      X position of the axis, relative to the center of the gauge
    • setCenterX

      @StudioProperty(defaultValue="0%") public GaugeAxis setCenterX(String centerX)
      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

      public String getCenterY()
      Returns:
      Y position of the axis, relative to the center of the gauge
    • setCenterY

      @StudioProperty(defaultValue="0%") public GaugeAxis setCenterY(String centerY)
      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

      public Integer 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

      public Double getEndValue()
      Returns:
      axis end (maximum) value
    • setEndValue

      @StudioProperty public GaugeAxis setEndValue(Double endValue)
      Sets axis end (maximum) value.
      Parameters:
      endValue - end value
      Returns:
      gauge axis
    • getGridInside

      public Boolean getGridInside()
      Returns:
      true if grid is drawn inside the axis
    • setGridInside

      @StudioProperty(defaultValue="true") public GaugeAxis setGridInside(Boolean gridInside)
      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

      public Boolean getInside()
      Returns:
      true if labels is placed inside the axis
    • setInside

      @StudioProperty(defaultValue="true") public GaugeAxis setInside(Boolean inside)
      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

      public Double getLabelFrequency()
      Returns:
      frequency of labels
    • setLabelFrequency

      @StudioProperty(defaultValue="1") public GaugeAxis setLabelFrequency(Double labelFrequency)
      Sets frequency of labels. If not set the default value is 1.
      Parameters:
      labelFrequency - frequency
      Returns:
      gauge axis
    • getLabelOffset

      public Integer getLabelOffset()
      Returns:
      distance from axis to the labels
    • setLabelOffset

      @StudioProperty(defaultValue="15") public GaugeAxis setLabelOffset(Integer labelOffset)
      Sets distance from axis to the labels. If not set the default value is 15.
      Parameters:
      labelOffset - label offset
      Returns:
      gauge axis
    • getMinorTickInterval

      public Double getMinorTickInterval()
      Returns:
      interval, at which minor ticks is placed
    • setMinorTickInterval

      @StudioProperty public GaugeAxis setMinorTickInterval(Double minorTickInterval)
      Sets interval, at which minor ticks should be placed.
      Parameters:
      minorTickInterval - minor tick interval
      Returns:
      gauge axis
    • getMinorTickLength

      public Integer getMinorTickLength()
      Returns:
      length of a minor tick
    • setMinorTickLength

      @StudioProperty(defaultValue="5") public GaugeAxis setMinorTickLength(Integer minorTickLength)
      Sets length of a minor tick. If not set the default value is 5.
      Parameters:
      minorTickLength - length
      Returns:
      gauge axis
    • getRadius

      public String getRadius()
      Returns:
      axis radius
    • setRadius

      @StudioProperty(defaultValue="95%") public GaugeAxis setRadius(String radius)
      Sets axis radius. If not set the default value is 95%.
      Parameters:
      radius - radius
      Returns:
      gauge axis
    • getShowFirstLabel

      public Boolean getShowFirstLabel()
      Returns:
      true if the first label is shown
    • setShowFirstLabel

      @StudioProperty(defaultValue="true") public GaugeAxis setShowFirstLabel(Boolean showFirstLabel)
      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

      public Boolean getShowLastLabel()
      Returns:
      true if the last label is shown
    • setShowLastLabel

      @StudioProperty(defaultValue="true") public GaugeAxis setShowLastLabel(Boolean showLastLabel)
      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

      public Integer 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

      public Double getStartValue()
      Returns:
      axis start (minimum) value
    • setStartValue

      @StudioProperty(defaultValue="0") public GaugeAxis setStartValue(Double startValue)
      Sets axis start (minimum) value. If not set the default value is 0.
      Parameters:
      startValue - start value
      Returns:
      gauge axis
    • getTickAlpha

      public Double 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

      public Color 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

      public Integer getTickLength()
      Returns:
      length of a major tick
    • setTickLength

      @StudioProperty(defaultValue="10") public GaugeAxis setTickLength(Integer tickLength)
      Sets length of a major tick. If not set the default value is 10.
      Parameters:
      tickLength - tick length
      Returns:
      gauge axis
    • getTickThickness

      public Integer getTickThickness()
      Returns:
      tick thickness
    • setTickThickness

      @StudioProperty(defaultValue="1") public GaugeAxis setTickThickness(Integer tickThickness)
      Sets tick thickness. If not set the default value is 1.
      Parameters:
      tickThickness - tick thickness
      Returns:
      gauge axis
    • getTopText

      public String getTopText()
      Returns:
      text displayed above the axis center
    • setTopText

      @StudioProperty public GaugeAxis setTopText(String topText)
      Sets text displayed above the axis center.
      Parameters:
      topText - top text
      Returns:
      gauge axis
    • getTopTextBold

      public Boolean getTopTextBold()
      Returns:
      true if top text is bold
    • setTopTextBold

      @StudioProperty(defaultValue="true") public GaugeAxis setTopTextBold(Boolean topTextBold)
      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

      public Color getTopTextColor()
      Returns:
      color of top text
    • setTopTextColor

      @StudioProperty(type=OPTIONS) public GaugeAxis setTopTextColor(Color topTextColor)
      Sets color of top text.
      Parameters:
      topTextColor - color
      Returns:
      gauge axis
    • getTopTextFontSize

      public Integer getTopTextFontSize()
      Returns:
      font size of top text
    • setTopTextFontSize

      @StudioProperty public GaugeAxis setTopTextFontSize(Integer topTextFontSize)
      Sets font size of top text.
      Parameters:
      topTextFontSize - font size
      Returns:
      gauge axis
    • getTopTextYOffset

      public Integer getTopTextYOffset()
      Returns:
      Y offset of top text
    • setTopTextYOffset

      @StudioProperty(defaultValue="0") public GaugeAxis setTopTextYOffset(Integer topTextYOffset)
      Sets Y offset of top text. If not set the default value is 0.
      Parameters:
      topTextYOffset - Y offset
      Returns:
      gauge axis
    • getUnit

      public String getUnit()
      Returns:
      string which is placed next to axis labels
    • setUnit

      @StudioProperty public GaugeAxis setUnit(String unit)
      Sets a string which can be placed next to axis labels.
      Parameters:
      unit - unit string
      Returns:
      gauge axis
    • getUnitPosition

      public UnitPosition 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

      public Integer getValueInterval()
      Returns:
      value interval
    • setValueInterval

      @StudioProperty public GaugeAxis setValueInterval(Integer valueInterval)
      Sets interval, at which ticks with values should be placed.
      Parameters:
      valueInterval - value interval
      Returns:
      gauge axis
    • getBands

      public List<GaugeBand> 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

      public GaugeAxis addBands(GaugeBand... bands)
      Adds bands.
      Parameters:
      bands - bands
      Returns:
      gauge axis
    • getGridCount

      public Integer getGridCount()
      Returns:
      number of grid lines
    • setGridCount

      @StudioProperty(defaultValue="5") public GaugeAxis setGridCount(Integer gridCount)
      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

      public String getId()
      Returns:
      unique id of an axis
    • setId

      @StudioProperty public GaugeAxis setId(String id)
      Sets unique id of an axis.
      Parameters:
      id - id
      Returns:
      gauge axis
    • getLabelsEnabled

      public Boolean getLabelsEnabled()
      Returns:
      true if labels on the axis is shown
    • setLabelsEnabled

      @StudioProperty(defaultValue="true") public GaugeAxis setLabelsEnabled(Boolean labelsEnabled)
      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

      public Boolean getUsePrefixes()
      Returns:
      if small and big numbers use prefixes
    • setUsePrefixes

      @StudioProperty(defaultValue="false") public GaugeAxis setUsePrefixes(Boolean usePrefixes)
      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

      public JsFunction getLabelFunction()
      Returns:
      JS function to format axis labels
    • setLabelFunction

      public GaugeAxis setLabelFunction(JsFunction labelFunction)
      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

      public Color getColor()
      Returns:
      labels color of the axis
    • setColor

      @StudioProperty(type=OPTIONS) public GaugeAxis setColor(Color color)
      Sets labels color of the axis.
      Parameters:
      color - color
      Returns:
      gauge axis
    • getFontSize

      public Integer getFontSize()
      Returns:
      font size for axis labels
    • setFontSize

      @StudioProperty public GaugeAxis setFontSize(Integer fontSize)
      Sets font size for axis labels.
      Parameters:
      fontSize - font size
      Returns:
      gauge axis
    • getBandGradientRatio

      public List<Float> getBandGradientRatio()
      Returns:
      list gradient ratios
    • setBandGradientRatio

      @StudioProperty(type=STRING) public GaugeAxis setBandGradientRatio(List<Float> bandGradientRatio)
      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