FusionCharts - Global population map by continent - Using icon legend with fixed data range
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.maps.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<div id="chart-container">
FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var populationMap = new FusionCharts({
type: 'world',
renderAt: 'chart-container',
width: '600',
height: '400',
dataFormat: 'json',
dataSource: {
"chart": {
"theme": "fint",
"formatNumberScale": "0",
"showLabels": "1"
},
"data": [{
"id": "NA",
"value": "515",
"link": "newchart-xml-2010Quarters"
}, {
"id": "SA",
"value": "373",
"link": "newchart-xml-2011Quarters"
}, {
"id": "EU",
"value": "3875",
"link": "newchart-xml-2012Quarters"
},
{
"id": "As",
"value": "4875",
"link": "newchart-xml-2013Quarters"
},{
"id": "AU",
"value": "9875",
"link": "newchart-xml-2014Quarters"
},
{
"id": "AF",
"value": "3875",
"link": "newchart-xml-2015Quarters"
}]
},
events: {
"entityClick": function(eventObj, dataObj) {
console.log(dataObj);
maptype = (dataObj.label).toLowerCase();
maptype=maptype.replace(/\s/g,'');
populationMap.configureLink({
type: maptype
});
}
}
}).render();
});