index.htm 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Highcharts Example</title>
  6. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  7. <script type="text/javascript">
  8. $(function () {
  9. $('#container').highcharts({
  10. chart: {
  11. type: 'column'
  12. },
  13. title: {
  14. text: 'Monthly Average Rainfall'
  15. },
  16. subtitle: {
  17. text: 'Source: WorldClimate.com'
  18. },
  19. xAxis: {
  20. categories: [
  21. 'Jan',
  22. 'Feb',
  23. 'Mar',
  24. 'Apr',
  25. 'May',
  26. 'Jun',
  27. 'Jul',
  28. 'Aug',
  29. 'Sep',
  30. 'Oct',
  31. 'Nov',
  32. 'Dec'
  33. ]
  34. },
  35. yAxis: {
  36. min: 0,
  37. title: {
  38. text: 'Rainfall (mm)'
  39. }
  40. },
  41. tooltip: {
  42. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  43. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  44. '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
  45. footerFormat: '</table>',
  46. shared: true,
  47. useHTML: true
  48. },
  49. plotOptions: {
  50. column: {
  51. pointPadding: 0.2,
  52. borderWidth: 0
  53. }
  54. },
  55. series: [{
  56. name: 'Tokyo',
  57. 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]
  58. }, {
  59. name: 'New York',
  60. 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]
  61. }, {
  62. name: 'London',
  63. 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]
  64. }, {
  65. name: 'Berlin',
  66. 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]
  67. }]
  68. });
  69. });
  70. </script>
  71. </head>
  72. <body>
  73. <script src="../../js/highcharts.js"></script>
  74. <script src="../../js/modules/exporting.js"></script>
  75. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  76. </body>
  77. </html>