Nessuna descrizione

HTMLPage.htm 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <script type="text/javascript" src="../ThirdParty/js/jquery-1.8.3.min.js"></script>
  5. <script type="text/javascript" src="../ThirdParty/js/highcharts.js"></script>
  6. <script type="text/javascript" src="../ThirdParty/js/modules/exporting.js"></script>
  7. <script>
  8. $(function() {
  9. $('#container').highcharts({
  10. chart: {
  11. zoomType: 'xy'
  12. },
  13. title: {
  14. text: '月平均温度和降雨量'
  15. },
  16. subtitle: {
  17. text: document.ontouchstart === undefined ?
  18. '框选放大' :
  19. '手势放大'
  20. },
  21. xAxis: [{
  22. categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
  23. }],
  24. yAxis: [{ // Primary yAxis
  25. labels: {
  26. format: '{value}°C',
  27. style: {
  28. color: '#89A54E'
  29. }
  30. },
  31. title: {
  32. text: '温度',
  33. style: {
  34. color: '#89A54E'
  35. }
  36. }
  37. }, { // Secondary yAxis
  38. title: {
  39. text: '降雨量',
  40. style: {
  41. color: '#4572A7'
  42. }
  43. },
  44. labels: {
  45. format: '{value} mm',
  46. style: {
  47. color: '#4572A7'
  48. }
  49. },
  50. opposite: true
  51. }],
  52. tooltip: {
  53. shared: true
  54. },
  55. legend: {
  56. layout: 'vertical',
  57. align: 'left',
  58. x: 120,
  59. verticalAlign: 'top',
  60. y: 100,
  61. floating: true,
  62. backgroundColor: '#FFFFFF'
  63. },
  64. series: [{
  65. name: '降雨量',
  66. type: 'column',
  67. yAxis: 1,
  68. 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],
  69. tooltip: {
  70. valueSuffix: ' mm'
  71. }
  72. }, {
  73. name: '温度',
  74. type: 'spline',
  75. data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
  76. tooltip: {
  77. valueSuffix: '°C'
  78. }
  79. }]
  80. });
  81. });
  82. </script>
  83. </head>
  84. <body>
  85. <div id="container" style="min-width: 700px; height: 400px">
  86. </div>
  87. </body>
  88. </html>