overlay two kinds of world maps over each other on Highmaps - Javascript highmap

Javascript examples for highmap:Map

Description

overlay two kinds of world maps over each other on Highmaps

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript">
$(function () {/*from  w w  w.j  a va  2s .c o  m*/
    // Instanciate the
    var data = [
                ['is', 1],
                ['no', 1],
                ['se', 1],
                ['dk', 1],
                ['fi', 1]
            ];
    Highcharts.mapChart('container', {
        chart: {
            borderWidth: 1
        },
        title: {
            text: 'Nordic countries'
        },
        subtitle: {
            text: 'Demo of drawing all areas in the map, only highlighting partial data'
        },
        legend: {
            enabled: false
        },
            plotOptions: {
           series: {
            mapData: Highcharts.maps['custom/europe']
          }
        },
        series: [{
            name: 'Country',
            joinBy: 'hc-key',
            color :'red',
            data: data.slice(),
            dataLabels: {
                enabled: true,
                color: '#FFFFFF',
                formatter: function () {
                    if (this.point.value) {
                        return this.point.name;
                    }
                }
            }
        }, {
           type: 'mapbubble',
          data: data,
          joinBy: 'hc-key',
          minSize: 30,
          maxSize: 40,
          dataLabels: {
             enabled: true,
            format: '{point.name}'
          }
        }]
    });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/maps/highmaps.js"></script> 
      <script src="https://code.highcharts.com/mapdata/custom/europe.js"></script> 
      <div id="container" style="height: 500px; min-width: 310px; max-width: 600px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials