Property | Type | Default | Description |
---|
axisAlpha | Number | 1 | Axis opacity. |
axisColor | Color | #000000 | Axis color. |
axisThickness | Number | 1 | Thickness of the axis outline. |
bandAlpha | Number | 1 | Opacity of band fills. |
bandGradientRatio | Array[Number] | [] | 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. |
bandOutlineAlpha | Number | 0 | Opacity of band outlines. |
bandOutlineColor | Color | #000000 | Color of band outlines. |
bandOutlineThickness | Number | 0 | Thickness of band outlines. |
bands | Array[GaugeBand] | | Array of bands - GaugeBand objects. Bands are used to draw color fills between specified values. |
bottomText | String | | Text displayed below the axis center. |
bottomTextBold | Boolean | true | Specifies if text should be bold. |
bottomTextColor | Color | | Bottom text color. |
bottomTextFontSize | Number | | Font size of bottom text. |
bottomTextYOffset | Number | 0 | Y offset of bottom text. |
centerX | Number/String | 0% | X position of the axis, relative to the center of the gauge. |
centerY | Number/String | 0% | Y position of the axis, relative to the center of the gauge. |
color | Color | | Specifies labels color of the axis. |
endAngle | Number | 120 | Axis end angle. Valid values are from - 180 to 180. |
endValue | Number | | Axis end (max) value |
fontSize | Number | | Font size for axis labels. |
gridCount | Number | 5 | 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. |
gridInside | Boolean | true | Specifies if grid should be drawn inside or outside the axis. |
id | Number/String | | Unique id of an axis. |
inside | Boolean | true | Specifies if labels should be placed inside or outside the axis. |
labelFrequency | Number | 1 | Frequency of labels. |
labelFunction | | | You can use this function to format axis labels. This function is called and value is passed as a attribute: labelFunction(value); |
labelOffset | Number | 15 | Distance from axis to the labels. |
labelsEnabled | Boolean | true | Specifies if labels on the axis should be shown. |
listeners | Array | | You can add listeners of events using this property. Example: listeners = [{"event":"clickBand", "method":handleClick}]; |
minorTickInterval | Number | | Interval, at which minor ticks should be placed. |
minorTickLength | Number | 5 | Length of a minor tick. |
radius | Number/String | 95% | Axis radius. |
showFirstLabel | Boolean | true | Specifies if the first label should be shown. |
showLastLabel | Boolean | true | Specifies if the last label should be shown. |
startAngle | Number | -120 | Axis start angle. Valid values are from - 180 to 180. |
startValue | Number | 0 | Axis start (min) value. |
tickAlpha | Number | 1 | Opacity of axis ticks. |
tickColor | Color | #555555 | Color of axis ticks. |
tickLength | Number | 10 | Length of a major tick. |
tickThickness | Number | 1 | Tick thickness. |
topText | String | | Text displayed above the axis center. |
topTextBold | Boolean | true | Specifies if text should be bold. |
topTextColor | Color | | Color of top text. |
topTextFontSize | Number | | Font size of top text. |
topTextYOffset | Number | 0 | Y offset of top text. |
unit | String | | A string which can be placed next to axis labels. |
unitPosition | String | right | Position of the unit. |
usePrefixes | Boolean | false | Specifies if small and big numbers should use prefixes to make them more readable. |
valueInterval | Number | | Interval, at which ticks with values should be placed. |
Name | Parameters | Returns | Description |
---|
addListener(type, handler) | 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 | | Adds event listener to the object. |
removeListener(chart, type, handler) | chart - chart object, type - event name, handler - method | | Removes event listener from chart object. |
setBottomText(text) | text - string | | Sets bottom text. |
setTopText(text) | text - string | | Sets top text. |
value2angle(value) | value - Number | | Returns angle of the value. |
Name | Event object | Description |
---|
clickBand | {type: "clickBand", dataItem: GaugeBand, chart: AmAngularGauge, event: MouseEvent} | Event which is fired when user clicks on gauge band. |
rollOutBand | {type: "rollOutBand", dataItem: GaugeBand, chart: AmAngularGauge, event: MouseEvent} | Event which is fired when user rolls-out gauge band. |
rollOverBand | {type: "rollOverBand", dataItem: GaugeBand, chart: AmAngularGauge, event: MouseEvent} | Event which is fired when user rolls-over gauge band. |