index.htm 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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/series-label.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <script src="../../code/modules/export-data.js"></script>
  15. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  16. <script type="text/javascript">
  17. // Data retrieved from http://vikjavev.no/ver/index.php?spenn=2d&sluttid=16.06.2015.
  18. Highcharts.chart('container', {
  19. chart: {
  20. type: 'spline',
  21. scrollablePlotArea: {
  22. minWidth: 600,
  23. scrollPositionX: 1
  24. }
  25. },
  26. title: {
  27. text: 'Wind speed during two days'
  28. },
  29. subtitle: {
  30. text: '13th & 14th of February, 2018 at two locations in Vik i Sogn, Norway'
  31. },
  32. xAxis: {
  33. type: 'datetime',
  34. labels: {
  35. overflow: 'justify'
  36. }
  37. },
  38. yAxis: {
  39. title: {
  40. text: 'Wind speed (m/s)'
  41. },
  42. minorGridLineWidth: 0,
  43. gridLineWidth: 0,
  44. alternateGridColor: null,
  45. plotBands: [{ // Light air
  46. from: 0.3,
  47. to: 1.5,
  48. color: 'rgba(68, 170, 213, 0.1)',
  49. label: {
  50. text: 'Light air',
  51. style: {
  52. color: '#606060'
  53. }
  54. }
  55. }, { // Light breeze
  56. from: 1.5,
  57. to: 3.3,
  58. color: 'rgba(0, 0, 0, 0)',
  59. label: {
  60. text: 'Light breeze',
  61. style: {
  62. color: '#606060'
  63. }
  64. }
  65. }, { // Gentle breeze
  66. from: 3.3,
  67. to: 5.5,
  68. color: 'rgba(68, 170, 213, 0.1)',
  69. label: {
  70. text: 'Gentle breeze',
  71. style: {
  72. color: '#606060'
  73. }
  74. }
  75. }, { // Moderate breeze
  76. from: 5.5,
  77. to: 8,
  78. color: 'rgba(0, 0, 0, 0)',
  79. label: {
  80. text: 'Moderate breeze',
  81. style: {
  82. color: '#606060'
  83. }
  84. }
  85. }, { // Fresh breeze
  86. from: 8,
  87. to: 11,
  88. color: 'rgba(68, 170, 213, 0.1)',
  89. label: {
  90. text: 'Fresh breeze',
  91. style: {
  92. color: '#606060'
  93. }
  94. }
  95. }, { // Strong breeze
  96. from: 11,
  97. to: 14,
  98. color: 'rgba(0, 0, 0, 0)',
  99. label: {
  100. text: 'Strong breeze',
  101. style: {
  102. color: '#606060'
  103. }
  104. }
  105. }, { // High wind
  106. from: 14,
  107. to: 15,
  108. color: 'rgba(68, 170, 213, 0.1)',
  109. label: {
  110. text: 'High wind',
  111. style: {
  112. color: '#606060'
  113. }
  114. }
  115. }]
  116. },
  117. tooltip: {
  118. valueSuffix: ' m/s'
  119. },
  120. plotOptions: {
  121. spline: {
  122. lineWidth: 4,
  123. states: {
  124. hover: {
  125. lineWidth: 5
  126. }
  127. },
  128. marker: {
  129. enabled: false
  130. },
  131. pointInterval: 3600000, // one hour
  132. pointStart: Date.UTC(2018, 1, 13, 0, 0, 0)
  133. }
  134. },
  135. series: [{
  136. name: 'Hestavollane',
  137. data: [
  138. 3.7, 3.3, 3.9, 5.1, 3.5, 3.8, 4.0, 5.0, 6.1, 3.7, 3.3, 6.4,
  139. 6.9, 6.0, 6.8, 4.4, 4.0, 3.8, 5.0, 4.9, 9.2, 9.6, 9.5, 6.3,
  140. 9.5, 10.8, 14.0, 11.5, 10.0, 10.2, 10.3, 9.4, 8.9, 10.6, 10.5, 11.1,
  141. 10.4, 10.7, 11.3, 10.2, 9.6, 10.2, 11.1, 10.8, 13.0, 12.5, 12.5, 11.3,
  142. 10.1
  143. ]
  144. }, {
  145. name: 'Vik',
  146. data: [
  147. 0.2, 0.1, 0.1, 0.1, 0.3, 0.2, 0.3, 0.1, 0.7, 0.3, 0.2, 0.2,
  148. 0.3, 0.1, 0.3, 0.4, 0.3, 0.2, 0.3, 0.2, 0.4, 0.0, 0.9, 0.3,
  149. 0.7, 1.1, 1.8, 1.2, 1.4, 1.2, 0.9, 0.8, 0.9, 0.2, 0.4, 1.2,
  150. 0.3, 2.3, 1.0, 0.7, 1.0, 0.8, 2.0, 1.2, 1.4, 3.7, 2.1, 2.0,
  151. 1.5
  152. ]
  153. }],
  154. navigation: {
  155. menuItemStyle: {
  156. fontSize: '10px'
  157. }
  158. }
  159. });
  160. </script>
  161. </body>
  162. </html>