FusionCharts - Map DrillDown to JavaScript function
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>
<script src="https://static.fusioncharts.com/code/latest/maps/fusioncharts.france.js"></script>
<!--
Enabling drill-down on map to a custom JavaScript function.
Attributes:
1. link (at data level). Format is j-functionName-list of arguments (separated by pipe character).
Other options to configure drilldown are
n- To open links in a new window
F- To pen link in frame
P- To open in pop-up window
newchart- This link invokes and creates LinkedChart
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var chart = new FusionCharts({
type: 'maps/france',
renderAt: 'chart-container',
width: '100%',
height: '500',
dataFormat: 'json',
dataSource: {
"chart": {
"animation": "0",
"showbevel": "0",
"usehovercolor": "1",
"canvasbordercolor": "FFFFFF",
"bordercolor": "FFFFFF",
"showlegend": "1",
"showshadow": "0",
"legendposition": "BOTTOM",
"legendborderalpha": "0",
"legendbordercolor": "ffffff",
"legendallowdrag": "0",
"legendshadow": "0",
"caption": "Website Visits for the month of Jan 2014",
"connectorcolor": "000000",
"fillalpha": "80",
"hovercolor": "CCCCCC",
"showborder": 0
},
"colorrange": {
"minvalue": "0",
"startlabel": "Low",
"endlabel": "High",
"code": "e44a00",
"gradient": "1",
"color": [{
"maxvalue": "2500",
"code": "f8bd19"
}, {
"maxvalue": "5000",
"code": "6baa01"
}]
},
"data": [{
"id": "002",
"value": 3979
}, {
"id": "003",
"value": 2754
}, {
"id": "004",
"value": 1329
}, {
"id": "017",
"value": 1389
}, {
"id": "006",
"value": 290
}, {
"id": "005",
"value": 2280
}, {
"id": "007",
"value": 2667
}, {
"id": "008",
"value": 744
}, {
"id": "009",
"value": 1908
}, {
"id": "010",
"value": 3666
}, {
"id": "023",
"value": 3491
}, {
"id": "011",
"value": 2154
}, {
"id": "012",
"value": 4186
}, {
"id": "013",
"value": 2097
}, {
"id": "014",
"value": 3598
}, {
"id": "015",
"value": 2416
}, {
...