index.htm 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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: 'spline'
  12. },
  13. title: {
  14. text: 'Wind speed during two days'
  15. },
  16. subtitle: {
  17. text: 'October 6th and 7th 2009 at two locations in Vik i Sogn, Norway'
  18. },
  19. xAxis: {
  20. type: 'datetime'
  21. },
  22. yAxis: {
  23. title: {
  24. text: 'Wind speed (m/s)'
  25. },
  26. min: 0,
  27. minorGridLineWidth: 0,
  28. gridLineWidth: 0,
  29. alternateGridColor: null,
  30. plotBands: [{ // Light air
  31. from: 0.3,
  32. to: 1.5,
  33. color: 'rgba(68, 170, 213, 0.1)',
  34. label: {
  35. text: 'Light air',
  36. style: {
  37. color: '#606060'
  38. }
  39. }
  40. }, { // Light breeze
  41. from: 1.5,
  42. to: 3.3,
  43. color: 'rgba(0, 0, 0, 0)',
  44. label: {
  45. text: 'Light breeze',
  46. style: {
  47. color: '#606060'
  48. }
  49. }
  50. }, { // Gentle breeze
  51. from: 3.3,
  52. to: 5.5,
  53. color: 'rgba(68, 170, 213, 0.1)',
  54. label: {
  55. text: 'Gentle breeze',
  56. style: {
  57. color: '#606060'
  58. }
  59. }
  60. }, { // Moderate breeze
  61. from: 5.5,
  62. to: 8,
  63. color: 'rgba(0, 0, 0, 0)',
  64. label: {
  65. text: 'Moderate breeze',
  66. style: {
  67. color: '#606060'
  68. }
  69. }
  70. }, { // Fresh breeze
  71. from: 8,
  72. to: 11,
  73. color: 'rgba(68, 170, 213, 0.1)',
  74. label: {
  75. text: 'Fresh breeze',
  76. style: {
  77. color: '#606060'
  78. }
  79. }
  80. }, { // Strong breeze
  81. from: 11,
  82. to: 14,
  83. color: 'rgba(0, 0, 0, 0)',
  84. label: {
  85. text: 'Strong breeze',
  86. style: {
  87. color: '#606060'
  88. }
  89. }
  90. }, { // High wind
  91. from: 14,
  92. to: 15,
  93. color: 'rgba(68, 170, 213, 0.1)',
  94. label: {
  95. text: 'High wind',
  96. style: {
  97. color: '#606060'
  98. }
  99. }
  100. }]
  101. },
  102. tooltip: {
  103. valueSuffix: ' m/s'
  104. },
  105. plotOptions: {
  106. spline: {
  107. lineWidth: 4,
  108. states: {
  109. hover: {
  110. lineWidth: 5
  111. }
  112. },
  113. marker: {
  114. enabled: false
  115. },
  116. pointInterval: 3600000, // one hour
  117. pointStart: Date.UTC(2009, 9, 6, 0, 0, 0)
  118. }
  119. },
  120. series: [{
  121. name: 'Hestavollane',
  122. data: [4.3, 5.1, 4.3, 5.2, 5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1,
  123. 7.9, 7.9, 7.5, 6.7, 7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4,
  124. 8.2, 8.5, 9.4, 8.1, 10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5,
  125. 7.1, 7.5, 8.1, 6.8, 3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2,
  126. 3.0, 3.0]
  127. }, {
  128. name: 'Voll',
  129. data: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0,
  130. 0.0, 0.4, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  131. 0.0, 0.6, 1.2, 1.7, 0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3,
  132. 3.0, 3.3, 4.8, 5.0, 4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4]
  133. }]
  134. ,
  135. navigation: {
  136. menuItemStyle: {
  137. fontSize: '10px'
  138. }
  139. }
  140. });
  141. });
  142. </script>
  143. </head>
  144. <body>
  145. <script src="../../js/highcharts.js"></script>
  146. <script src="../../js/modules/exporting.js"></script>
  147. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  148. </body>
  149. </html>