FusionCharts - Custom Label & Tooltips for entities
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>
<!-- Using custom label and tooltip feature to highlight the states with highest and lowest sales in a week.
# displayValue
# tooltext
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var salesMap = new FusionCharts({
type: 'usa',
renderAt: 'chart-container',
width: '600',
height: '400',
dataFormat: 'json',
dataSource: {
"chart": {
"theme": "fusion",
"caption": "Sales - Last Year",
"entityFillColor": "#cccccc",
"entityFillHoverColor": "#666666",
"subcaption": "Highest & lowest state",
"numberPrefix": "$"
},
"data": [{
"id": "IN",
"value": "920000",
"color": "#e44a00",
"alpha": "100",
"showLabel": "1",
"fontBold": "1",
//Using custom label to display
"displayValue": "Lowest sale.{br}$920K",
//Using custom tooltip
"tooltext": "Lowest sale for last week. Indiana $dataValue"
}, {
"id": "TX",
"value": "97344000",
"color": "#6baa01",
"alpha": "100",
"showLabel": "1",
"fontBold": "1",
"displayValue": "Highest sale.{br}$97.34M",
"tooltext": "Highest sale for last week. Texas $dataValue"
}]
}
}).render();
});