JavaScript
// Prepare demo data
// Data is joined to map using value of 'hc-key' property by default.
// See API docs for 'joinBy' for more info on linking data and map.
var data = [
['ir', 0],
['ph', 1],
['sa', 2],
['jp', 3],
['th', 4],
['om', 5],
['ye', 6],
['in', 7],
['kr', 8],
['bd', 9],
['sp', 10],
['cn', 11],
['bh', 12],
['mm', 13],
['id', 14],
['sg', 15],
['ru', 54],
['sh', 17],
['my', 18],
['az', 19],
['am', 20],
['vn', 21],
['tj', 22],
['uz', 23],
['tl', 24],
['kh', 25],
['bt', 26],
['ge', 27],
['kz', 28],
['il', 29],
['sy', 30],
['jo', 31],
['tm', 32],
['cnm', 33],
['mn', 34],
['kw', 35],
['iq', 36],
['ae', 37],
['la', 38],
['pk', 39],
['jk', 40],
['qa', 41],
['tr', 42],
['bn', 43],
['af', 44],
['kp', 45],
['lb', 46],
['nc', 47],
['cy', 48],
['tw', 49],
['np', 50],
['lk', 54],
['kg', 52]
];
// Create the chart
Highcharts.mapChart('container', {
chart: {
map: 'custom/asia'
},
title: {
text: 'Asia map'
},
tooltip:{
formatter:function(){
debugger;
return this.key;
}
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
legend:{enabled:false},
colorAxis: {
dataClasses: [
{
from: 0,
to: 53,
color: '#cfd8dc',
}, {
from: 54,
to: 54,
color: '#b9f6ca',
},
]},
series: [{
data: data,
name: 'Random data',
states: {
hover: {
color: '#BADA55'
}
},
dataLabels: {
enabled: false,
format: '{point.name}'
}
}]
});