FusionCharts - Use color label as value in Bulb 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>
<div id="chart-container">
FusionCharts will render here</div>
CSS
#headerdiv {
font-family: "Arial", "Helvetica";
font-size: 13px;
font-weight: bold;
}
#valueDiv {
color: #EEEEEE;
text-align: center;
font-size: 25px;
padding: 10px;
margin-top: 5px;
font-family: "Arial", "Helvetica";
font-weight: bold;
}
JavaScript
FusionCharts.ready(function() {
var salesChart = new FusionCharts({
type: 'bulb',
renderAt: 'chart-container',
id: 'myChart',
width: '300',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Temperature status of deep freezers",
"upperlimit": "-5",
"lowerlimit": "-60",
"captionPadding": "30",
"showshadow": "0",
"showvalue": "1",
"useColorNameAsValue": "1",
"placeValuesInside": "1",
"valueFontSize": "16",
"chartBottomMargin": "45",
//Tooltext
"plottooltext": "Current Temperature: $value°C ",
//Theme
"theme": "fusion"
},
"colorrange": {
"color": [{
"minvalue": "-60",
"maxvalue": "-35",
"label": "Mission control,{br}we have a situation!",
"code": "#ff0000"
}, {
"minvalue": "-35",
"maxvalue": "-25",
"label": "Something is just{br}not right!",
"code": "#ff9900"
}, {
"minvalue": "-25",
"maxvalue": "-5",
"label": "All well ahoy!",
"code": "#00ff00"
}]
},
"value": "-5",
//All annotations are grouped under this element
"annotations": {
"showbelow": "0",
"groups": [{
//Each group needs a unique ID
"id": "valtext",
"items": [{
"id": "background",
//Rectangle item
"type": "rectangle",
"alpha": "50",
"fillColor": "#AABBCC",
"x": "$chartCenterX-30",
"tox": "$chartCenterX+30",
"y": "$chartEndY-35",
"toy": "$chartEndY-5"
}, {
"id": "valuetxt",
"type": "text",
"text": "-5°C",
"alpha": "100",
"font": "Helvetica Neue,Arial",
"bold": "0",
"fontSize": "14",
"fontColor":...