snsdrMobileBody.htm 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <style type="text/css">
  5. .button {
  6. width: 50px;
  7. line-height: 20px;
  8. text-align: center;
  9. font-weight: bold;
  10. color: #fff;
  11. text-shadow: 1px 1px 1px #333;
  12. border-radius: 5px;
  13. margin: 0 0 0 10px;
  14. position: relative;
  15. overflow: hidden;
  16. }
  17. .button.blue {
  18. border: 0px solid #1e7db9;
  19. box-shadow: 0 1px 2px #8fcaee inset, 0 -1px 0 #497897 inset, 0 -2px 3px
  20. #8fcaee inset;
  21. background: -webkit-linear-gradient(top, #42a4e0, #2e88c0);
  22. background: -moz-linear-gradient(top, #42a4e0, #2e88c0);
  23. background: linear-gradient(top, #42a4e0, #2e88c0);
  24. }
  25. </style>
  26. <script>
  27. $(function() {
  28. Highcharts.setOptions({
  29. lang: {
  30. resetZoom: "重置",
  31. }
  32. });
  33. $('#container').highcharts({
  34. chart: {
  35. backgroundColor: "rgba(0,0,0,0)",
  36. margin: [30, 5, 50, 40],
  37. zoomType: 'x',
  38. renderTo: "container"
  39. },
  40. colors: ["#3a8ecf", "#f6bd0f","#8bba00"],
  41. exporting: {
  42. enabled: false
  43. },
  44. title: {
  45. text: "湿度日线",
  46. style: {
  47. fontSize: 16
  48. },
  49. margin: 10
  50. },
  51. xAxis: {
  52. categories: eval($("#categories").val()),
  53. },
  54. yAxis: {
  55. title: {
  56. text: null
  57. },
  58. tickPixelInterval: 50,
  59. gridLineDashStyle: 'longdash'//Y轴网格线样式
  60. },
  61. tooltip: {
  62. valueDecimals: 1,
  63. valueSuffix: "rh",
  64. followTouchMove: true,
  65. followPointer:true,
  66. shared: true,
  67. useHTML: true,
  68. crosshairs: [ {
  69. width: 2,
  70. color: "gray",
  71. dashStyle: "shortdot"
  72. }, {
  73. width: 2,
  74. color: "gray",
  75. dashStyle: "shortdot"
  76. } ]
  77. },
  78. legend: {
  79. layout: 'vertical',
  80. align: 'right',
  81. verticalAlign: "top",
  82. borderWidth: 0
  83. },
  84. credits: {
  85. enabled: false
  86. },
  87. plotOptions: {
  88. column: {
  89. pointPadding: 0.2,
  90. borderWidth: 0
  91. },
  92. series: {
  93. lineWidth: 1,
  94. marker: {
  95. enabled: true, //数据点是否显示
  96. radius:0.5, //数据点大小
  97. },
  98. }
  99. },
  100. series: [{
  101. name: "日湿度",
  102. data: eval($("#sdrdata").val())
  103. }],
  104. });
  105. });
  106. function snsdQc(){
  107. loadZnsMain("snsd");
  108. if ($("#mcid").val() != null) {
  109. loadPtsTjt($("#mcid").val(), $("#zsid").val(), $("#lqid").val(), "snsd");
  110. }
  111. }
  112. </script>
  113. </head>
  114. <body>
  115. <input type="hidden" id="mcid" name="mcid" value="$!mcid"/>
  116. <input type="hidden" id="zsid" name="zsid" value="$!zsid">
  117. <input type="hidden" id="lqid" name="lqid" value="$!lqid">
  118. <input type="hidden" id="categories" name="categories" value="$!categories" />
  119. <input type="hidden" id="sdrdata" name="sdrdata" value="$!sdrdata" />
  120. <input type="hidden" value="$!type" id="type">
  121. <div>
  122. <div style="float:right"><button type="button" class="button blue" onclick="snsdQc();" >日线</button></div>
  123. <div id="container" style="height: 100%; width: 100%;"></div>
  124. </div>
  125. </body>
  126. </html>