FusionCharts - Configuring pointer Horizontal 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 pointer properties in a simple Horizontal Linear Gauge showing Server CPU Utilization
Element :
# pointer
Attributes:
# borderColor - To set the border color of the pointer (Hex code).
# borderThickness - To set the thickness of the boder (In pixel).
# borderAlpha - To set the alpha of the border (0-100).
# bgColor - To set the background color of the pointer (Hex code).
# bgAlpha - To set the background alpha of the pointer (Hex code).
# radius - To set the radius of the pointer.
# sides - To set number of sides of the pointer.
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',
width: '400',
height: '150',
dataFormat: 'json',
dataSource: {
"chart": {
"theme": "fusion",
"caption": "Server CPU Utilization",
"captionPadding": "0",
"numberSuffix": "%",
"valueFontSize": "11",
"valueFontBold": "0",
"chartBottomMargin": "20",
"gaugeFillMix": "{light-10},{light-70},{dark-10}",
"gaugeFillRatio": "40,20,40"
},
"colorRange": {
"color": [{
"minValue": "0",
"maxValue": "35",
"label": "Low",
"code": "#6baa01"
},
{
"minValue": "35",
"maxValue": "70",
"label": "Moderate",
"code": "#f8bd19"
},
{
"minValue": "70",
"maxValue": "100",
"label": "High",
"code": "#e44a00"
}
]
},
"pointers": {
"pointer": [{
"borderColor": "#333333",
"borderThickness": "2",
"borderAlpha": "60",
"bgColor": "#0075c2",
"bgAlpha": "75",
"radius": "6",
"sides": "4",
"value": "75"
}]
}
}
})
.render();
});