GaugeAxis
Type class
Creates an axis for AmAngularGauge charts, multiple can be assigned.
Example
```js var chart = AmCharts.makeChart("chartdiv",{ ... "axes": [ { "startValue": 0, "endValue": 100, "valueInterval": 10, "bands": [ { "startValue": 0, "endValue": 100 } ] } ] });```Sources
This information about GaugeAxis is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
GaugeAxis does not extend any other symbol.
GaugeAxis is not extended by any other symbol.
Properties
axisAlphaType
numberDefault1Axis opacity.
axisColorType
colorDefault#000000Axis color.
axisThicknessType
numberDefault1Thickness of the axis outline.
bandAlphaType
numberDefault1Opacity of band fills.
bandGradientRatioType
number[]Default[]Example: [-0.2, 0, -0.2]. 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.
bandOutlineAlphaType
numberDefault0Opacity of band outlines.
bandOutlineColorType
colorDefault#000000Color of band outlines.
bandOutlineThicknessType
numberDefault0Thickness of band outlines.
bandsType
GaugeBand[]Array of bands - GaugeBand objects. Bands are used to draw color fills between specified values.
bottomTextType
stringText displayed below the axis center.
bottomTextBoldType
booleanDefaulttrueSpecifies if text should be bold.
bottomTextColorType
colorBottom text color.
bottomTextFontSizeType
numberFont size of bottom text.
bottomTextYOffsetType
numberDefault0Y offset of bottom text.
centerXType
number/stringDefault0%X position of the axis, relative to the center of the gauge.
centerYType
number/stringDefault0%Y position of the axis, relative to the center of the gauge.
colorType
colorSpecifies labels color of the axis.
endAngleType
numberDefault120Axis end angle. Valid values are from - 180 to 180.
endValueType
numberAxis end (max) value
fontSizeType
numberFont size for axis labels.
gridCountType
numberDefault5Number 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.
gridInsideType
booleanDefaulttrueSpecifies if grid should be drawn inside or outside the axis.
idType
number/stringUnique id of an axis.
insideType
booleanDefaulttrueSpecifies if labels should be placed inside or outside the axis.
labelFrequencyType
numberDefault1Frequency of labels.
labelFunctionYou can use this function to format axis labels. This function is called and value is passed as a attribute: labelFunction(value);
labelOffsetType
numberDefault15Distance from axis to the labels.
labelsEnabledType
booleanDefaulttrueSpecifies if labels on the axis should be shown.
listenersType
arrayYou can add listeners of events using this property. Example: listeners = [{"event":"clickBand", "method":handleClick}];
minorTickIntervalType
numberInterval, at which minor ticks should be placed.
minorTickLengthType
numberDefault5Length of a minor tick.
radiusType
number/stringDefault95%Axis radius.
showFirstLabelType
booleanDefaulttrueSpecifies if the first label should be shown.
showLastLabelType
booleanDefaulttrueSpecifies if the last label should be shown.
startAngleType
numberDefault-120Axis start angle. Valid values are from - 180 to 180.
startValueType
numberDefault0Axis start (min) value.
tickAlphaType
numberDefault1Opacity of axis ticks.
tickColorType
colorDefault#555555Color of axis ticks.
tickLengthType
numberDefault10Length of a major tick.
tickThicknessType
numberDefault1Tick thickness.
topTextType
stringText displayed above the axis center.
topTextBoldType
booleanDefaulttrueSpecifies if text should be bold.
topTextColorType
colorColor of top text.
topTextFontSizeType
numberFont size of top text.
topTextYOffsetType
numberDefault0Y offset of top text.
unitType
stringA string which can be placed next to axis labels.
unitPositionType
stringDefaultrightPosition of the unit.
usePrefixesType
booleanDefaultfalseSpecifies if small and big numbers should use prefixes to make them more readable.
valueIntervalType
numberInterval, at which ticks with values should be placed.
Methods
addListener()Returns
voidAdds event listener to the object.
type - string like 'clickBand' (should be listed in 'events' section of this class or classes which extend this class). handler - function which is called when event happens
removeListener()Returns
voidRemoves event listener from chart object.
chart - chart object, type - event name, handler - method
setBottomText()Returns
voidSets bottom text.
text - string
setTopText()Returns
voidSets top text.
text - string
value2angle()Returns
voidReturns angle of the value.
value - Number
Events
clickBandParam { type:
"clickBand", target:GaugeAxis} &{type: "clickBand", dataItem: GaugeBand, chart: AmAngularGauge, event: MouseEvent}Event which is fired when user clicks on gauge band.
rollOutBandParam { type:
"rollOutBand", target:GaugeAxis} &{type: "rollOutBand", dataItem: GaugeBand, chart: AmAngularGauge, event: MouseEvent}Event which is fired when user rolls-out gauge band.
rollOverBandParam { type:
"rollOverBand", target:GaugeAxis} &{type: "rollOverBand", dataItem: GaugeBand, chart: AmAngularGauge, event: MouseEvent}Event which is fired when user rolls-over gauge band.