c0ebbb00c99039f51bfe96646ac618c112847a45.svn-base 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
  7. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. // Data retrieved from http://vikjavev.no/ver/index.php?spenn=2d&sluttid=16.06.2015.
  12. $(function () {
  13. $('#container').highcharts({
  14. chart: {
  15. type: 'spline'
  16. },
  17. title: {
  18. text: 'Wind speed during two days'
  19. },
  20. subtitle: {
  21. text: 'May 31 and and June 1, 2015 at two locations in Vik i Sogn, Norway'
  22. },
  23. xAxis: {
  24. type: 'datetime',
  25. labels: {
  26. overflow: 'justify'
  27. }
  28. },
  29. yAxis: {
  30. title: {
  31. text: 'Wind speed (m/s)'
  32. },
  33. minorGridLineWidth: 0,
  34. gridLineWidth: 0,
  35. alternateGridColor: null,
  36. plotBands: [{ // Light air
  37. from: 0.3,
  38. to: 1.5,
  39. color: 'rgba(68, 170, 213, 0.1)',
  40. label: {
  41. text: 'Light air',
  42. style: {
  43. color: '#606060'
  44. }
  45. }
  46. }, { // Light breeze
  47. from: 1.5,
  48. to: 3.3,
  49. color: 'rgba(0, 0, 0, 0)',
  50. label: {
  51. text: 'Light breeze',
  52. style: {
  53. color: '#606060'
  54. }
  55. }
  56. }, { // Gentle breeze
  57. from: 3.3,
  58. to: 5.5,
  59. color: 'rgba(68, 170, 213, 0.1)',
  60. label: {
  61. text: 'Gentle breeze',
  62. style: {
  63. color: '#606060'
  64. }
  65. }
  66. }, { // Moderate breeze
  67. from: 5.5,
  68. to: 8,
  69. color: 'rgba(0, 0, 0, 0)',
  70. label: {
  71. text: 'Moderate breeze',
  72. style: {
  73. color: '#606060'
  74. }
  75. }
  76. }, { // Fresh breeze
  77. from: 8,
  78. to: 11,
  79. color: 'rgba(68, 170, 213, 0.1)',
  80. label: {
  81. text: 'Fresh breeze',
  82. style: {
  83. color: '#606060'
  84. }
  85. }
  86. }, { // Strong breeze
  87. from: 11,
  88. to: 14,
  89. color: 'rgba(0, 0, 0, 0)',
  90. label: {
  91. text: 'Strong breeze',
  92. style: {
  93. color: '#606060'
  94. }
  95. }
  96. }, { // High wind
  97. from: 14,
  98. to: 15,
  99. color: 'rgba(68, 170, 213, 0.1)',
  100. label: {
  101. text: 'High wind',
  102. style: {
  103. color: '#606060'
  104. }
  105. }
  106. }]
  107. },
  108. tooltip: {
  109. valueSuffix: ' m/s'
  110. },
  111. plotOptions: {
  112. spline: {
  113. lineWidth: 4,
  114. states: {
  115. hover: {
  116. lineWidth: 5
  117. }
  118. },
  119. marker: {
  120. enabled: false
  121. },
  122. pointInterval: 3600000, // one hour
  123. pointStart: Date.UTC(2015, 4, 31, 0, 0, 0)
  124. }
  125. },
  126. series: [{
  127. name: 'Hestavollane',
  128. data: [0.2, 0.8, 0.8, 0.8, 1, 1.3, 1.5, 2.9, 1.9, 2.6, 1.6, 3, 4, 3.6, 4.5, 4.2, 4.5, 4.5, 4, 3.1, 2.7, 4, 2.7, 2.3, 2.3, 4.1, 7.7, 7.1, 5.6, 6.1, 5.8, 8.6, 7.2, 9, 10.9, 11.5, 11.6, 11.1, 12, 12.3, 10.7, 9.4, 9.8, 9.6, 9.8, 9.5, 8.5, 7.4, 7.6]
  129. }, {
  130. name: 'Vik',
  131. data: [0, 0, 0.6, 0.9, 0.8, 0.2, 0, 0, 0, 0.1, 0.6, 0.7, 0.8, 0.6, 0.2, 0, 0.1, 0.3, 0.3, 0, 0.1, 0, 0, 0, 0.2, 0.1, 0, 0.3, 0, 0.1, 0.2, 0.1, 0.3, 0.3, 0, 3.1, 3.1, 2.5, 1.5, 1.9, 2.1, 1, 2.3, 1.9, 1.2, 0.7, 1.3, 0.4, 0.3]
  132. }],
  133. navigation: {
  134. menuItemStyle: {
  135. fontSize: '10px'
  136. }
  137. }
  138. });
  139. });
  140. </script>
  141. </head>
  142. <body>
  143. <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
  144. <script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>
  145. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  146. </body>
  147. </html>