123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <!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">
- #container {
- height: 500px;
- min-width: 310px;
- max-width: 800px;
- margin: 0 auto;
- }
- .loading {
- margin-top: 10em;
- text-align: center;
- color: gray;
- }
- </style>
- <script type="text/javascript">
- $(function () {
- $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=world-population-density.json&callback=?', function (data) {
- // Initiate the chart
- $('#container').highcharts('Map', {
- title : {
- text : 'Population density by country (/km²)'
- },
- mapNavigation: {
- enabled: true,
- buttonOptions: {
- verticalAlign: 'bottom'
- }
- },
- colorAxis: {
- min: 1,
- max: 1000,
- type: 'logarithmic'
- },
- series : [{
- data : data,
- mapData: Highcharts.maps['custom/world'],
- joinBy: ['iso-a2', 'code'],
- name: 'Population density',
- states: {
- hover: {
- color: '#BADA55'
- }
- },
- tooltip: {
- valueSuffix: '/km²'
- }
- }]
- });
- });
- });
- </script>
- </head>
- <body>
- <script src="../../js/highmaps.js"></script>
- <script src="../../js/modules/data.js"></script>
- <script src="../../js/modules/exporting.js"></script>
- <script src="http://code.highcharts.com/mapdata/custom/world.js"></script>
- <div id="container" style="max-width: 1000px"></div>
- </body>
- </html>
|