123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Highmaps Example</title>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
- <style type="text/css">
- ${demo.css}
- </style>
- <script type="text/javascript">
- $(function () {
- $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=world-population.json&callback=?', function (data) {
- var mapData = Highcharts.geojson(Highcharts.maps['custom/world']);
- // Correct UK to GB in data
- $.each(data, function () {
- if (this.code === 'UK') {
- this.code = 'GB';
- }
- });
- $('#container').highcharts('Map', {
- chart : {
- borderWidth : 1
- },
- title: {
- text: 'World population 2013 by country'
- },
- subtitle : {
- text : 'Demo of Highcharts map with bubbles'
- },
- legend: {
- enabled: false
- },
- mapNavigation: {
- enabled: true,
- buttonOptions: {
- verticalAlign: 'bottom'
- }
- },
- series : [{
- name: 'Countries',
- mapData: mapData,
- color: '#E0E0E0',
- enableMouseTracking: false
- }, {
- type: 'mapbubble',
- mapData: mapData,
- name: 'Population 2013',
- joinBy: ['iso-a2', 'code'],
- data: data,
- minSize: 4,
- maxSize: '12%',
- tooltip: {
- pointFormat: '{point.code}: {point.z} thousands'
- }
- }]
- });
- });
- });
- </script>
- </head>
- <body>
- <script src="../../js/highmaps.js"></script>
- <script src="../../js/modules/data.js"></script>
- <script src="http://code.highcharts.com/mapdata/custom/world.js"></script>
- <div id="container" style="height: 500px; min-width: 310px; max-width: 800px; margin: 0 auto"></div>
- </body>
- </html>
|