Angular Gauge - Showing dial values and placing them
Created using FusionCharts Suite XT - www.fusioncharts.com
by Aksel B.
HTML
<script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
<script src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"></script>
<!-- AngularGauge - Showing dial values and placing them. Here, we've added 2 dials to the chart and configured their value textfield positions individually
Element
# Dial - adding more than one
Attributes:
# showValue - Whether to show value for this dial?
# valueX - X-axis position for the value
# valueY - Y-axis position for the value
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var cSatScoreChart = new FusionCharts({
type: 'angulargauge',
renderAt: 'chart-container',
width: '400',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Net Promoter Score",
"lowerLimit": "0",
"upperLimit": "100",
"gaugeFillMix": "{dark-40},{light-40},{dark-20}",
"needleRadius": "0",
'showGaugeBorder': '0',
'gaugeBorderAlpha': '0',
'borderThickness': '0',
"theme": "fusion"
},
"colorRange": {
"color": [{
"minValue": "0",
"maxValue": "59",
"code": "#e44a00"
},
{
"minValue": "59",
"maxValue": "83",
"code": "#f8bd19"
},
{
"minValue": "83",
"maxValue": "100",
"code": "#6baa01"
}
]
},
"dials": {
"dial": [{
"showValue": "0",
"valueX": "0",
"valueY": "0",
"bgAlpha": "0",
"bgColor": "#FFF",
"borderColor": "#FFF",
"borderThickness": "0",
"borderAlpha": "0",
"color": "#FFF",
"rearExtension": "0"
}
]
}
}
}).render();
});