FusionCharts -Setting cylinder fill color in Cylinder widget
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>
<!-- Setting cylinder fill color in Cylinder gauge showing the consumption of Diesel in Generator in Bakersfield Central outlet using attribute:
# cylFillColor - To change the Cylinder fill color (in hex)
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var fuelWidget = new FusionCharts({
type: 'cylinder',
dataFormat: 'json',
id: 'fuelMeter',
renderAt: 'chart-container',
width: '200',
height: '350',
dataSource: {
"chart": {
"theme": "fusion",
"caption": "Diesel Level in Generator",
"subcaption": "Bakersfield Central",
"lowerLimit": "0",
"upperLimit": "120",
"lowerLimitDisplay": "Empty",
"upperLimitDisplay": "Full",
"numberSuffix": " ltrs",
"showValue": "1",
"chartBottomMargin": "25",
//Changing the Cylinder fill color
"cylFillColor": "#1aaf5d"
},
"value": "75"
}
}).render();
});