qtzbrMobileBody.htm 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. zoomType: 'x',
  36. marginTop: 70,
  37. backgroundColor: "rgba(0,0,0,0)",
  38. margin: [30, 5, 50, 50],
  39. marginRight: 5,
  40. renderTo: "container"
  41. },
  42. colors: ["#3a8ecf", "#f6bd0f","#8bba00"],
  43. exporting: {
  44. enabled: false
  45. },
  46. title: {
  47. text: "氨气浓度日线",
  48. style: {
  49. fontSize: 16
  50. },
  51. margin: 10
  52. },
  53. xAxis: {
  54. categories: eval($("#categories").val()),
  55. },
  56. yAxis: {
  57. title: {
  58. text: null
  59. },
  60. tickPixelInterval: 50,
  61. gridLineDashStyle: 'longdash'//Y轴网格线样式
  62. },
  63. tooltip: {
  64. valueDecimals: 2,
  65. valueSuffix: "ppm",
  66. followTouchMove: true,
  67. followPointer:true,
  68. shared: true,
  69. useHTML: true,
  70. crosshairs: [ {
  71. width: 2,
  72. color: "gray",
  73. dashStyle: "shortdot"
  74. }, {
  75. width: 2,
  76. color: "gray",
  77. dashStyle: "shortdot"
  78. } ]
  79. },
  80. legend: {
  81. layout: 'vertical',
  82. align: 'right',
  83. verticalAlign: "top",
  84. borderWidth: 0
  85. },
  86. credits: {
  87. enabled: false
  88. },
  89. plotOptions: {
  90. column: {
  91. pointPadding: 0.2,
  92. borderWidth: 0
  93. },
  94. series: {
  95. lineWidth: 1,
  96. marker: {
  97. enabled: true, //数据点是否显示
  98. radius: 0.5, //数据点大小
  99. },
  100. }
  101. },
  102. series: [{
  103. name: "日氨气",
  104. data: eval($("#aqdata").val())
  105. }],
  106. });
  107. });
  108. function qtzbQc(){
  109. loadZnsMain("qtzb");
  110. if ($("#mcid").val() != null) {
  111. loadPtsTjt($("#mcid").val(), $("#zsid").val(), $("#lqid").val(), "qtzb");
  112. }
  113. }
  114. </script>
  115. </head>
  116. <body>
  117. <input type="hidden" id="mcid" name="mcid" value="$!mcid"/>
  118. <input type="hidden" id="zsid" name="zsid" value="$!zsid">
  119. <input type="hidden" id="lqid" name="lqid" value="$!lqid">
  120. <input type="hidden" id="categories" name="categories" value="$!categories" />
  121. <input type="hidden" id="aqdata" name="aqdata" value="$!aqdata" />
  122. <input type="hidden" value="$!type" id="type">
  123. <div>
  124. <div style="float:right"><button type="button" class="button blue" onclick="qtzbQc();" >日线</button></div>
  125. <div id="container" style="height: 100%; width: 100%;"></div>
  126. </div>
  127. </body>
  128. </html>