wtinfo.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. 
  2. var chart1;
  3. var chart2;
  4. var options1;
  5. var options2;
  6. Highcharts.setOptions({
  7. global : {
  8. useUTC : false
  9. }
  10. });
  11. String.prototype.endWith=function(oString){
  12. var reg=new RegExp(oString+"$");
  13. return reg.test(this);
  14. }
  15. options1 = {
  16. chart: {
  17. renderTo: 'container2',
  18. type: 'gauge',
  19. plotBackgroundColor: null,
  20. plotBackgroundImage: null,
  21. plotBorderWidth: 0,
  22. plotShadow: false,
  23. events: {
  24. load: function () {
  25. this.renderer.image('/resource/images/system/pictures/fxtb.png', 0, 0, 142, 142)
  26. .attr({
  27. zIndex: 2
  28. }).add();
  29. }
  30. }
  31. },
  32. title: {
  33. text: ''
  34. },
  35. pane: {
  36. startAngle: 0,
  37. endAngle: 360,
  38. size:100
  39. },
  40. plotOptions: {
  41. gauge: {
  42. color: {
  43. style: {
  44. "visibility": "hidden"
  45. }
  46. },
  47. dataLabels: {
  48. style: {
  49. "visibility" : "hidden"
  50. }
  51. },
  52. dial: {
  53. backgroundColor: {
  54. linearGradient: [10, 10, 0, 1],
  55. stops: [
  56. [0, 'rgb(255, 255, 255)'],
  57. [1, 'rgb(3, 53, 91)']
  58. ]
  59. },
  60. baseLength:'-10%',
  61. borderColor: '#0f0',
  62. borderWidth:0,
  63. baseWidth: 15,
  64. topWidth: 0,
  65. endAngle: 150,
  66. radius: '80%',
  67. rearLength: '80%',
  68. zIndex: 8
  69. },
  70. pivot:
  71. {
  72. backgroundColor: {
  73. linearGradient: [10, 0, 10, 1],
  74. stops: [
  75. [0, 'rgb(214, 200, 195)'],
  76. [1, 'rgb(200, 200, 255)']
  77. ]
  78. },
  79. radius:0.1
  80. }
  81. }
  82. },
  83. // the value axis
  84. yAxis: {
  85. min: 0,
  86. max: 360,
  87. labels:{
  88. enabled: false
  89. }
  90. },
  91. series: [{
  92. name: '风向',
  93. data: [0],
  94. tooltip: {
  95. valueSuffix: ''
  96. }
  97. }]
  98. };
  99. options2 = {
  100. chart: {
  101. renderTo: 'container3',
  102. type: 'gauge',
  103. plotBackgroundColor: null,
  104. plotBackgroundImage: null,
  105. plotBorderWidth: 0,
  106. plotShadow: false,
  107. events: {
  108. load: function () {
  109. this.renderer.image('/resource/images/system/pictures/fxtb.png', 0, 0, 142, 142)
  110. .attr({
  111. zIndex: 2
  112. }).add();
  113. }
  114. }
  115. },
  116. title: {
  117. text: ''
  118. },
  119. pane: {
  120. startAngle: 0,
  121. endAngle: 360,
  122. size:100
  123. },
  124. plotOptions: {
  125. gauge: {
  126. color: {
  127. style: {
  128. "visibility": "hidden"
  129. }
  130. },
  131. dataLabels: {
  132. style: {
  133. "visibility" : "hidden"
  134. }
  135. },
  136. dial: {
  137. backgroundColor: {
  138. linearGradient: [10, 10, 0, 1],
  139. stops: [
  140. [0, 'rgb(255, 255, 255)'],
  141. [1, 'rgb(255, 0, 0)']
  142. ]
  143. },
  144. baseLength:'-10%',
  145. borderColor: '#0f0',
  146. borderWidth:0,
  147. baseWidth: 15,
  148. topWidth: 0,
  149. endAngle: 150,
  150. radius: '80%',
  151. rearLength: '80%',
  152. zIndex: 8
  153. },
  154. pivot:
  155. {
  156. backgroundColor: {
  157. linearGradient: [10, 0, 10, 1],
  158. stops: [
  159. [0, 'rgb(214, 200, 195)'],
  160. [1, 'rgb(200, 200, 255)']
  161. ]
  162. },
  163. radius:0.1
  164. }
  165. }
  166. },
  167. // the value axis
  168. yAxis: {
  169. min: 0,
  170. max: 360,
  171. labels:{
  172. enabled: false
  173. }
  174. },
  175. series: [{
  176. name: '对风角度',
  177. data: [0],
  178. tooltip: {
  179. valueSuffix: ''
  180. }
  181. }]
  182. };