index.htm 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Highcharts Example</title>
  7. <style type="text/css">
  8. </style>
  9. </head>
  10. <body>
  11. <script src="../../code/highcharts.js"></script>
  12. <script src="../../code/modules/exporting.js"></script>
  13. <script src="../../code/modules/export-data.js"></script>
  14. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  15. <script type="text/javascript">
  16. Highcharts.chart('container', {
  17. chart: {
  18. type: 'column'
  19. },
  20. title: {
  21. text: 'Monthly Average Rainfall'
  22. },
  23. subtitle: {
  24. text: 'Source: WorldClimate.com'
  25. },
  26. xAxis: {
  27. categories: [
  28. 'Jan',
  29. 'Feb',
  30. 'Mar',
  31. 'Apr',
  32. 'May',
  33. 'Jun',
  34. 'Jul',
  35. 'Aug',
  36. 'Sep',
  37. 'Oct',
  38. 'Nov',
  39. 'Dec'
  40. ],
  41. crosshair: true
  42. },
  43. yAxis: {
  44. min: 0,
  45. title: {
  46. text: 'Rainfall (mm)'
  47. }
  48. },
  49. tooltip: {
  50. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  51. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  52. '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
  53. footerFormat: '</table>',
  54. shared: true,
  55. useHTML: true
  56. },
  57. plotOptions: {
  58. column: {
  59. pointPadding: 0.2,
  60. borderWidth: 0
  61. }
  62. },
  63. series: [{
  64. name: 'Tokyo',
  65. data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
  66. }, {
  67. name: 'New York',
  68. data: [83.6, 78.8, 98.5, 93.4, 106.0, 84.5, 105.0, 104.3, 91.2, 83.5, 106.6, 92.3]
  69. }, {
  70. name: 'London',
  71. data: [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 65.2, 59.3, 51.2]
  72. }, {
  73. name: 'Berlin',
  74. data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]
  75. }]
  76. });
  77. </script>
  78. </body>
  79. </html>