index.htm 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. var ranges = [
  10. [1246406400000, 14.3, 27.7],
  11. [1246492800000, 14.5, 27.8],
  12. [1246579200000, 15.5, 29.6],
  13. [1246665600000, 16.7, 30.7],
  14. [1246752000000, 16.5, 25.0],
  15. [1246838400000, 17.8, 25.7],
  16. [1246924800000, 13.5, 24.8],
  17. [1247011200000, 10.5, 21.4],
  18. [1247097600000, 9.2, 23.8],
  19. [1247184000000, 11.6, 21.8],
  20. [1247270400000, 10.7, 23.7],
  21. [1247356800000, 11.0, 23.3],
  22. [1247443200000, 11.6, 23.7],
  23. [1247529600000, 11.8, 20.7],
  24. [1247616000000, 12.6, 22.4],
  25. [1247702400000, 13.6, 19.6],
  26. [1247788800000, 11.4, 22.6],
  27. [1247875200000, 13.2, 25.0],
  28. [1247961600000, 14.2, 21.6],
  29. [1248048000000, 13.1, 17.1],
  30. [1248134400000, 12.2, 15.5],
  31. [1248220800000, 12.0, 20.8],
  32. [1248307200000, 12.0, 17.1],
  33. [1248393600000, 12.7, 18.3],
  34. [1248480000000, 12.4, 19.4],
  35. [1248566400000, 12.6, 19.9],
  36. [1248652800000, 11.9, 20.2],
  37. [1248739200000, 11.0, 19.3],
  38. [1248825600000, 10.8, 17.8],
  39. [1248912000000, 11.8, 18.5],
  40. [1248998400000, 10.8, 16.1]
  41. ],
  42. averages = [
  43. [1246406400000, 21.5],
  44. [1246492800000, 22.1],
  45. [1246579200000, 23],
  46. [1246665600000, 23.8],
  47. [1246752000000, 21.4],
  48. [1246838400000, 21.3],
  49. [1246924800000, 18.3],
  50. [1247011200000, 15.4],
  51. [1247097600000, 16.4],
  52. [1247184000000, 17.7],
  53. [1247270400000, 17.5],
  54. [1247356800000, 17.6],
  55. [1247443200000, 17.7],
  56. [1247529600000, 16.8],
  57. [1247616000000, 17.7],
  58. [1247702400000, 16.3],
  59. [1247788800000, 17.8],
  60. [1247875200000, 18.1],
  61. [1247961600000, 17.2],
  62. [1248048000000, 14.4],
  63. [1248134400000, 13.7],
  64. [1248220800000, 15.7],
  65. [1248307200000, 14.6],
  66. [1248393600000, 15.3],
  67. [1248480000000, 15.3],
  68. [1248566400000, 15.8],
  69. [1248652800000, 15.2],
  70. [1248739200000, 14.8],
  71. [1248825600000, 14.4],
  72. [1248912000000, 15],
  73. [1248998400000, 13.6]
  74. ];
  75. $('#container').highcharts({
  76. title: {
  77. text: 'July temperatures'
  78. },
  79. xAxis: {
  80. type: 'datetime'
  81. },
  82. yAxis: {
  83. title: {
  84. text: null
  85. }
  86. },
  87. tooltip: {
  88. crosshairs: true,
  89. shared: true,
  90. valueSuffix: '°C'
  91. },
  92. legend: {
  93. },
  94. series: [{
  95. name: 'Temperature',
  96. data: averages,
  97. zIndex: 1,
  98. marker: {
  99. fillColor: 'white',
  100. lineWidth: 2,
  101. lineColor: Highcharts.getOptions().colors[0]
  102. }
  103. }, {
  104. name: 'Range',
  105. data: ranges,
  106. type: 'arearange',
  107. lineWidth: 0,
  108. linkedTo: ':previous',
  109. color: Highcharts.getOptions().colors[0],
  110. fillOpacity: 0.3,
  111. zIndex: 0
  112. }]
  113. });
  114. });
  115. </script>
  116. </head>
  117. <body>
  118. <script src="../../js/highcharts.js"></script>
  119. <script src="../../js/highcharts-more.js"></script>
  120. <script src="../../js/modules/exporting.js"></script>
  121. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  122. </body>
  123. </html>