FusionCharts - Enabling editMode in Linear Gauge
Created using FusionCharts Suite XT - www.fusioncharts.com
by FusionCharts
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>
<!-- Enabling editMode in simple Horizontal Linear Gauge provided to online customers of food.hsm.com to rate their satisfaction index using attribute:
# editMode - Allows users to visually drag & change the value of pointer when set to 1. Once the value is updated, it can be retrieved from the chart using client-side JavaScript.
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var csiGauge = new FusionCharts({
type: 'hlineargauge',
renderAt: 'chart-container',
id: 'csi-linear-gauge',
width: '400',
height: '190',
dataFormat: 'json',
dataSource: {
"chart": {
"theme": "fusion",
"caption": "Target CSAT Index",
"lowerLimit": "0",
"upperLimit": "100",
"numberSuffix": "%",
"chartBottomMargin": "40",
"valueFontSize": "11",
"valueFontBold": "0",
"gaugeFillMix": "{light-10},{light-70},{dark-10}",
"gaugeFillRatio": "40,20,40",
"editMode": "1"
},
"colorRange": {
"color": [{
"minValue": "0",
"maxValue": "35",
"label": "Low",
"code": "#e44a00"
},
{
"minValue": "35",
"maxValue": "70",
"label": "Moderate",
"code": "#f8bd19"
},
{
"minValue": "70",
"maxValue": "100",
"label": "High",
"code": "#6baa01"
}
]
},
"pointers": {
"pointer": [{
"value": "0"
}]
}
}
})
.render();
});