dataZoom-dataShadow2.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <script src="esl.js"></script>
  5. <script src="config.js"></script>
  6. </head>
  7. <body>
  8. <style>
  9. html, body, #main {
  10. width: 100%;
  11. height: 100%;
  12. }
  13. body {
  14. margin: 0;
  15. }
  16. </style>
  17. <div id="main"></div>
  18. <script>
  19. require([
  20. 'echarts',
  21. 'echarts/chart/line',
  22. 'echarts/component/title',
  23. 'echarts/component/grid',
  24. 'echarts/component/axis',
  25. 'echarts/component/dataZoom',
  26. 'echarts/component/tooltip',
  27. 'echarts/component/markPoint',
  28. 'echarts/component/markLine'
  29. ], function (echarts) {
  30. var chart = echarts.init(document.getElementById('main'));
  31. var option = {
  32. "title": {
  33. "text": "Data shadow when there are EMPTY VALUES."
  34. },
  35. "tooltip": {
  36. "trigger": "axis"
  37. },
  38. "grid": {
  39. "left": "3%",
  40. "right": "4%",
  41. "bottom": "55%",
  42. "containLabel": true
  43. },
  44. "dataZoom": [
  45. {
  46. "type": "slider",
  47. // "start": 90,
  48. // "end":100,
  49. "bottom": 20,
  50. "height": 200
  51. }
  52. ],
  53. "xAxis": [
  54. {
  55. "type": "time",
  56. "boundaryGap": false,
  57. // "min": 1451577600000,
  58. // "max": 1476201600000
  59. }
  60. ],
  61. "yAxis": [
  62. {
  63. "type": "value"
  64. }
  65. ],
  66. "series": [
  67. {
  68. "type": "line",
  69. "connectNulls": false,
  70. "areaStyle": {
  71. "normal": {
  72. "color": "#E77271"
  73. }
  74. },
  75. "lineStyle": {
  76. "normal": {
  77. "color": "#E77271"
  78. }
  79. },
  80. "data": [
  81. [
  82. "2016-09-20T16:00:00.000Z",
  83. null
  84. ],
  85. [
  86. "2016-09-21T16:00:00.000Z",
  87. 13
  88. ],
  89. [
  90. "2016-09-22T16:00:00.000Z",
  91. 3
  92. ],
  93. [
  94. "2016-09-23T16:00:00.000Z",
  95. null
  96. ],
  97. [
  98. "2016-09-24T16:00:00.000Z",
  99. null
  100. ],
  101. [
  102. "2016-09-25T16:00:00.000Z",
  103. null
  104. ],
  105. [
  106. "2016-09-26T16:00:00.000Z",
  107. null
  108. ],
  109. [
  110. "2016-09-27T16:00:00.000Z",
  111. 61
  112. ],
  113. [
  114. "2016-09-28T16:00:00.000Z",
  115. 28
  116. ],
  117. [
  118. "2016-09-29T16:00:00.000Z",
  119. 21
  120. ],
  121. [
  122. "2016-09-30T16:00:00.000Z",
  123. null
  124. ],
  125. [
  126. "2016-10-01T16:00:00.000Z",
  127. null
  128. ],
  129. [
  130. "2016-10-05T16:00:00.000Z",
  131. null
  132. ],
  133. [
  134. "2016-10-06T16:00:00.000Z",
  135. null
  136. ],
  137. [
  138. "2016-10-07T16:00:00.000Z",
  139. null
  140. ],
  141. [
  142. "2016-10-08T16:00:00.000Z",
  143. NaN
  144. ],
  145. [
  146. "2016-10-09T16:00:00.000Z",
  147. 35
  148. ],
  149. [
  150. "2016-10-10T16:00:00.000Z",
  151. 46
  152. ],
  153. [
  154. "2016-10-11T16:00:00.000Z",
  155. 8
  156. ],
  157. [
  158. "2016-10-12T16:00:00.000Z",
  159. '-'
  160. ]
  161. ]
  162. }
  163. ]
  164. };
  165. chart.setOption(option);
  166. })
  167. </script>
  168. </body>
  169. </html>