index.htm 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Highmaps Example</title>
  6. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  7. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. // Instanciate the map
  13. $('#container').highcharts('Map', {
  14. chart : {
  15. borderWidth : 1
  16. },
  17. title : {
  18. text : 'Nordic countries'
  19. },
  20. subtitle : {
  21. text : 'Demo of drawing all areas in the map, only highlighting partial data'
  22. },
  23. legend: {
  24. enabled: false
  25. },
  26. series : [{
  27. name: 'Country',
  28. mapData: Highcharts.maps['custom/europe'],
  29. data: [{
  30. code: 'IS',
  31. value: 1
  32. }, {
  33. code: 'NO',
  34. value: 1
  35. }, {
  36. code: 'SE',
  37. value: 1
  38. }, {
  39. code: 'FI',
  40. value: 1
  41. }, {
  42. code: 'DK',
  43. value: 1
  44. }],
  45. joinBy: ['iso-a2', 'code'],
  46. dataLabels: {
  47. enabled: true,
  48. color: 'white',
  49. formatter: function () {
  50. if (this.point.value) {
  51. return this.point.name;
  52. }
  53. }
  54. },
  55. tooltip: {
  56. headerFormat: '',
  57. pointFormat: '{point.name}'
  58. }
  59. }]
  60. });
  61. });
  62. </script>
  63. </head>
  64. <body>
  65. <script src="../../js/highmaps.js"></script>
  66. <script src="http://code.highcharts.com/mapdata/custom/europe.js"></script>
  67. <div id="container" style="height: 500px; min-width: 310px; max-width: 600px; margin: 0 auto"></div>
  68. </body>
  69. </html>