You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

299 lines
7.6 KiB

9 years ago
  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. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. // Parse the data from an inline table using the Highcharts Data plugin
  13. $('#container').highcharts({
  14. data: {
  15. table: 'freq',
  16. startRow: 1,
  17. endRow: 17,
  18. endColumn: 7
  19. },
  20. chart: {
  21. polar: true,
  22. type: 'column'
  23. },
  24. title: {
  25. text: 'Wind rose for South Shore Met Station, Oregon'
  26. },
  27. subtitle: {
  28. text: 'Source: or.water.usgs.gov'
  29. },
  30. pane: {
  31. size: '85%'
  32. },
  33. legend: {
  34. align: 'right',
  35. verticalAlign: 'top',
  36. y: 100,
  37. layout: 'vertical'
  38. },
  39. xAxis: {
  40. tickmarkPlacement: 'on'
  41. },
  42. yAxis: {
  43. min: 0,
  44. endOnTick: false,
  45. showLastLabel: true,
  46. title: {
  47. text: 'Frequency (%)'
  48. },
  49. labels: {
  50. formatter: function () {
  51. return this.value + '%';
  52. }
  53. },
  54. reversedStacks: false
  55. },
  56. tooltip: {
  57. valueSuffix: '%'
  58. },
  59. plotOptions: {
  60. series: {
  61. stacking: 'normal',
  62. shadow: false,
  63. groupPadding: 0,
  64. pointPlacement: 'on'
  65. }
  66. }
  67. });
  68. });
  69. </script>
  70. </head>
  71. <body>
  72. <script src="../../js/highcharts.js"></script>
  73. <script src="../../js/highcharts-more.js"></script>
  74. <script src="../../js/modules/data.js"></script>
  75. <script src="../../js/modules/exporting.js"></script>
  76. <div id="container" style="min-width: 420px; max-width: 600px; height: 400px; margin: 0 auto"></div>
  77. <div style="display:none">
  78. <!-- Source: http://or.water.usgs.gov/cgi-bin/grapher/graph_windrose.pl -->
  79. <table id="freq" border="0" cellspacing="0" cellpadding="0">
  80. <tr nowrap bgcolor="#CCCCFF">
  81. <th colspan="9" class="hdr">Table of Frequencies (percent)</th>
  82. </tr>
  83. <tr nowrap bgcolor="#CCCCFF">
  84. <th class="freq">Direction</th>
  85. <th class="freq">&lt; 0.5 m/s</th>
  86. <th class="freq">0.5-2 m/s</th>
  87. <th class="freq">2-4 m/s</th>
  88. <th class="freq">4-6 m/s</th>
  89. <th class="freq">6-8 m/s</th>
  90. <th class="freq">8-10 m/s</th>
  91. <th class="freq">&gt; 10 m/s</th>
  92. <th class="freq">Total</th>
  93. </tr>
  94. <tr nowrap>
  95. <td class="dir">N</td>
  96. <td class="data">1.81</td>
  97. <td class="data">1.78</td>
  98. <td class="data">0.16</td>
  99. <td class="data">0.00</td>
  100. <td class="data">0.00</td>
  101. <td class="data">0.00</td>
  102. <td class="data">0.00</td>
  103. <td class="data">3.75</td>
  104. </tr>
  105. <tr nowrap bgcolor="#DDDDDD">
  106. <td class="dir">NNE</td>
  107. <td class="data">0.62</td>
  108. <td class="data">1.09</td>
  109. <td class="data">0.00</td>
  110. <td class="data">0.00</td>
  111. <td class="data">0.00</td>
  112. <td class="data">0.00</td>
  113. <td class="data">0.00</td>
  114. <td class="data">1.71</td>
  115. </tr>
  116. <tr nowrap>
  117. <td class="dir">NE</td>
  118. <td class="data">0.82</td>
  119. <td class="data">0.82</td>
  120. <td class="data">0.07</td>
  121. <td class="data">0.00</td>
  122. <td class="data">0.00</td>
  123. <td class="data">0.00</td>
  124. <td class="data">0.00</td>
  125. <td class="data">1.71</td>
  126. </tr>
  127. <tr nowrap bgcolor="#DDDDDD">
  128. <td class="dir">ENE</td>
  129. <td class="data">0.59</td>
  130. <td class="data">1.22</td>
  131. <td class="data">0.07</td>
  132. <td class="data">0.00</td>
  133. <td class="data">0.00</td>
  134. <td class="data">0.00</td>
  135. <td class="data">0.00</td>
  136. <td class="data">1.88</td>
  137. </tr>
  138. <tr nowrap>
  139. <td class="dir">E</td>
  140. <td class="data">0.62</td>
  141. <td class="data">2.20</td>
  142. <td class="data">0.49</td>
  143. <td class="data">0.00</td>
  144. <td class="data">0.00</td>
  145. <td class="data">0.00</td>
  146. <td class="data">0.00</td>
  147. <td class="data">3.32</td>
  148. </tr>
  149. <tr nowrap bgcolor="#DDDDDD">
  150. <td class="dir">ESE</td>
  151. <td class="data">1.22</td>
  152. <td class="data">2.01</td>
  153. <td class="data">1.55</td>
  154. <td class="data">0.30</td>
  155. <td class="data">0.13</td>
  156. <td class="data">0.00</td>
  157. <td class="data">0.00</td>
  158. <td class="data">5.20</td>
  159. </tr>
  160. <tr nowrap>
  161. <td class="dir">SE</td>
  162. <td class="data">1.61</td>
  163. <td class="data">3.06</td>
  164. <td class="data">2.37</td>
  165. <td class="data">2.14</td>
  166. <td class="data">1.74</td>
  167. <td class="data">0.39</td>
  168. <td class="data">0.13</td>
  169. <td class="data">11.45</td>
  170. </tr>
  171. <tr nowrap bgcolor="#DDDDDD">
  172. <td class="dir">SSE</td>
  173. <td class="data">2.04</td>
  174. <td class="data">3.42</td>
  175. <td class="data">1.97</td>
  176. <td class="data">0.86</td>
  177. <td class="data">0.53</td>
  178. <td class="data">0.49</td>
  179. <td class="data">0.00</td>
  180. <td class="data">9.31</td>
  181. </tr>
  182. <tr nowrap>
  183. <td class="dir">S</td>
  184. <td class="data">2.66</td>
  185. <td class="data">4.74</td>
  186. <td class="data">0.43</td>
  187. <td class="data">0.00</td>
  188. <td class="data">0.00</td>
  189. <td class="data">0.00</td>
  190. <td class="data">0.00</td>
  191. <td class="data">7.83</td>
  192. </tr>
  193. <tr nowrap bgcolor="#DDDDDD">
  194. <td class="dir">SSW</td>
  195. <td class="data">2.96</td>
  196. <td class="data">4.14</td>
  197. <td class="data">0.26</td>
  198. <td class="data">0.00</td>
  199. <td class="data">0.00</td>
  200. <td class="data">0.00</td>
  201. <td class="data">0.00</td>
  202. <td class="data">7.37</td>
  203. </tr>
  204. <tr nowrap>
  205. <td class="dir">SW</td>
  206. <td class="data">2.53</td>
  207. <td class="data">4.01</td>
  208. <td class="data">1.22</td>
  209. <td class="data">0.49</td>
  210. <td class="data">0.13</td>
  211. <td class="data">0.00</td>
  212. <td class="data">0.00</td>
  213. <td class="data">8.39</td>
  214. </tr>
  215. <tr nowrap bgcolor="#DDDDDD">
  216. <td class="dir">WSW</td>
  217. <td class="data">1.97</td>
  218. <td class="data">2.66</td>
  219. <td class="data">1.97</td>
  220. <td class="data">0.79</td>
  221. <td class="data">0.30</td>
  222. <td class="data">0.00</td>
  223. <td class="data">0.00</td>
  224. <td class="data">7.70</td>
  225. </tr>
  226. <tr nowrap>
  227. <td class="dir">W</td>
  228. <td class="data">1.64</td>
  229. <td class="data">1.71</td>
  230. <td class="data">0.92</td>
  231. <td class="data">1.45</td>
  232. <td class="data">0.26</td>
  233. <td class="data">0.10</td>
  234. <td class="data">0.00</td>
  235. <td class="data">6.09</td>
  236. </tr>
  237. <tr nowrap bgcolor="#DDDDDD">
  238. <td class="dir">WNW</td>
  239. <td class="data">1.32</td>
  240. <td class="data">2.40</td>
  241. <td class="data">0.99</td>
  242. <td class="data">1.61</td>
  243. <td class="data">0.33</td>
  244. <td class="data">0.00</td>
  245. <td class="data">0.00</td>
  246. <td class="data">6.64</td>
  247. </tr>
  248. <tr nowrap>
  249. <td class="dir">NW</td>
  250. <td class="data">1.58</td>
  251. <td class="data">4.28</td>
  252. <td class="data">1.28</td>
  253. <td class="data">0.76</td>
  254. <td class="data">0.66</td>
  255. <td class="data">0.69</td>
  256. <td class="data">0.03</td>
  257. <td class="data">9.28</td>
  258. </tr>
  259. <tr nowrap bgcolor="#DDDDDD">
  260. <td class="dir">NNW</td>
  261. <td class="data">1.51</td>
  262. <td class="data">5.00</td>
  263. <td class="data">1.32</td>
  264. <td class="data">0.13</td>
  265. <td class="data">0.23</td>
  266. <td class="data">0.13</td>
  267. <td class="data">0.07</td>
  268. <td class="data">8.39</td>
  269. </tr>
  270. <tr nowrap>
  271. <td class="totals">Total</td>
  272. <td class="totals">25.53</td>
  273. <td class="totals">44.54</td>
  274. <td class="totals">15.07</td>
  275. <td class="totals">8.52</td>
  276. <td class="totals">4.31</td>
  277. <td class="totals">1.81</td>
  278. <td class="totals">0.23</td>
  279. <td class="totals">&nbsp;</td>
  280. </tr>
  281. </table>
  282. </div>
  283. </body>
  284. </html>