FusionCharts -Configuring gradient mix in Linear Gauge
Created using FusionCharts Suite XT - www.fusioncharts.com
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.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>
<!-- Configuring gradient mix in a simple Horizontal Linear Gauge showing Server CPU Utilization using attributes:
# gaugeFillMix - Set to "{light-10},{light-70},{dark-10}.
It takes a base color for fill and manipulates it to achieve light and dark color combinations. e.g. {light-10} represents a color which is 10% lighter than the color originally.
# gaugeFillRatio - Set to "40,20,40".
The ratio determines how far that particular color will spread before mixing with the next color.
Deviation from theme
# valueFontSize
# valueFontBold
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function () {
var cpuGauge = new FusionCharts({
type: 'hlineargauge',
renderAt: 'chart-container',
id: 'cpu-linear-gauge',
width: '400',
height: '170',
dataFormat: 'json',
dataSource: {
"chart": {
"theme": "fint",
"caption": "Server CPU Utilization",
"lowerLimit": "0",
"upperLimit": "100",
"numberSuffix": "%",
"chartBottomMargin": "20",
"valueFontSize": "11",
"valueFontBold": "0",
"gaugeFillMix":"{light-4},{light-70}",
"gaugeFillRatio":"60,40"
},
"colorRange": {
"color": [
{
"minValue": "0",
"maxValue": "35",
"label": "Low",
},
{
"minValue": "35",
"maxValue": "70",
"label": "Moderate",
},
{
"minValue": "70",
"maxValue": "100",
"label": "High",
}
]
},
"pointers": {
"pointer": [
{
"value": "75"
}
]
}
}
})
.render();
});