FusionCharts - Configuring gauge border of 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>
<!-- Configuring gauge border of a simple Horizontal Linear Gauge showing Server CPU Utilization using attributes:
# showGaugeBorder - Whether to show border of the gauge
# gaugeBorderColor - Color of the border (in hex) , or gradient fill mix
e.g. {light-50} which means 50% lighter than its fill color.
# gaugeBorderThickness - Thickness of border (in pixels)
# gaugeBorderAlpha - Transparency of border (0-100 scale)
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": "fusion",
"caption": "Server CPU Utilization",
"lowerLimit": "0",
"upperLimit": "100",
"numberSuffix": "%",
"chartBottomMargin": "20",
"valueFontSize": "11",
"valueFontBold": "0",
//Showing gauge border
"showGaugeBorder": "1",
//Used a gradient fill mix to color border
//range using 30% lighter color than its fill color
//A hex value can also be used e.g '#666666'
"gaugeBorderColor": "{light-50}",
//Changing Thickness
"gaugeBorderThickness": "4",
//Changing Alpha
"gaugeBorderAlpha": "100"
},
"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();
});