FusionCharts - Angular Gauge (Speedometer or Dial Chart) in JavaScript Example
Created using FusionCharts Suite XT - www.fusioncharts.com
by Vishalika
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.widgets.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- Showcase of Customer Satisfaction Score for current week using Angular Gauge. -->
<div id="chart-container">FusionCharts will render here</div>
<script>
function myJS(data)
{
alert(data);
}
</script>
JavaScript
FusionCharts.ready(function () {
var cSatScoreChart = new FusionCharts({
type: 'angulargauge',
renderAt: 'chart-container',
width: '400',
height: '250',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Customer Satisfaction Score",
"subcaption": "Last week",
"lowerLimit": "0",
"upperLimit": "100",
"theme": "fint"
},
"colorRange": {
"color": [
{
"minValue": "0",
"maxValue": "25",
"code": "#e44a00"
},
{
"minValue": "25",
"maxValue": "50",
"code": "#f8bd19"
},
{
"minValue": "50",
"maxValue": "75",
"code": "#6baa01"
},
{
"minValue": "75",
"maxValue": "100",
"code": "#6bua02"
}
]
},
"dials": {
"dial": [{
"value": "67",
"link":"j-myJS-1234"
}]
}
}
});
cSatScoreChart.render();
});