area-with-missing-data.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  7. <title>Area with missing data</title>
  8. <link href="../../assets/styles.css" rel="stylesheet" />
  9. <style>
  10. #chart {
  11. max-width: 650px;
  12. margin: 35px auto;
  13. }
  14. </style>
  15. <script>
  16. window.Promise ||
  17. document.write(
  18. '<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"><\/script>'
  19. )
  20. window.Promise ||
  21. document.write(
  22. '<script src="https://cdn.jsdelivr.net/npm/eligrey-classlist-js-polyfill@1.2.20171210/classList.min.js"><\/script>'
  23. )
  24. window.Promise ||
  25. document.write(
  26. '<script src="https://cdn.jsdelivr.net/npm/findindex_polyfill_mdn"><\/script>'
  27. )
  28. </script>
  29. <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
  30. <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
  31. <script src="https://cdn.jsdelivr.net/npm/vue-apexcharts"></script>
  32. </head>
  33. <body>
  34. <div id="app">
  35. <div id="chart">
  36. <apexchart type="area" height="350" :options="chartOptions" :series="series"></apexchart>
  37. </div>
  38. </div>
  39. <!-- Below element is just for displaying source code. it is not required. DO NOT USE -->
  40. <div id="html">
  41. &lt;div id=&quot;chart&quot;&gt;
  42. &lt;apexchart type=&quot;area&quot; height=&quot;350&quot; :options=&quot;chartOptions&quot; :series=&quot;series&quot;&gt;&lt;/apexchart&gt;
  43. &lt;/div&gt;
  44. </div>
  45. <script>
  46. new Vue({
  47. el: '#app',
  48. components: {
  49. apexchart: VueApexCharts,
  50. },
  51. data: {
  52. series: [{
  53. name: 'Network',
  54. data: [{
  55. x: 'Dec 23 2017',
  56. y: null
  57. },
  58. {
  59. x: 'Dec 24 2017',
  60. y: 44
  61. },
  62. {
  63. x: 'Dec 25 2017',
  64. y: 31
  65. },
  66. {
  67. x: 'Dec 26 2017',
  68. y: 38
  69. },
  70. {
  71. x: 'Dec 27 2017',
  72. y: null
  73. },
  74. {
  75. x: 'Dec 28 2017',
  76. y: 32
  77. },
  78. {
  79. x: 'Dec 29 2017',
  80. y: 55
  81. },
  82. {
  83. x: 'Dec 30 2017',
  84. y: 51
  85. },
  86. {
  87. x: 'Dec 31 2017',
  88. y: 67
  89. },
  90. {
  91. x: 'Jan 01 2018',
  92. y: 22
  93. },
  94. {
  95. x: 'Jan 02 2018',
  96. y: 34
  97. },
  98. {
  99. x: 'Jan 03 2018',
  100. y: null
  101. },
  102. {
  103. x: 'Jan 04 2018',
  104. y: null
  105. },
  106. {
  107. x: 'Jan 05 2018',
  108. y: 11
  109. },
  110. {
  111. x: 'Jan 06 2018',
  112. y: 4
  113. },
  114. {
  115. x: 'Jan 07 2018',
  116. y: 15,
  117. },
  118. {
  119. x: 'Jan 08 2018',
  120. y: null
  121. },
  122. {
  123. x: 'Jan 09 2018',
  124. y: 9
  125. },
  126. {
  127. x: 'Jan 10 2018',
  128. y: 34
  129. },
  130. {
  131. x: 'Jan 11 2018',
  132. y: null
  133. },
  134. {
  135. x: 'Jan 12 2018',
  136. y: null
  137. },
  138. {
  139. x: 'Jan 13 2018',
  140. y: 13
  141. },
  142. {
  143. x: 'Jan 14 2018',
  144. y: null
  145. }
  146. ],
  147. }],
  148. chartOptions: {
  149. chart: {
  150. type: 'area',
  151. height: 350,
  152. animations: {
  153. enabled: false
  154. },
  155. zoom: {
  156. enabled: false
  157. },
  158. },
  159. dataLabels: {
  160. enabled: false
  161. },
  162. stroke: {
  163. curve: 'straight'
  164. },
  165. fill: {
  166. opacity: 0.8,
  167. type: 'pattern',
  168. pattern: {
  169. style: ['verticalLines', 'horizontalLines'],
  170. width: 5,
  171. height: 6
  172. },
  173. },
  174. markers: {
  175. size: 5,
  176. hover: {
  177. size: 9
  178. }
  179. },
  180. title: {
  181. text: 'Network Monitoring',
  182. },
  183. tooltip: {
  184. intersect: true,
  185. shared: false
  186. },
  187. theme: {
  188. palette: 'palette1'
  189. },
  190. xaxis: {
  191. type: 'datetime',
  192. },
  193. yaxis: {
  194. title: {
  195. text: 'Bytes Received'
  196. }
  197. }
  198. },
  199. },
  200. })
  201. </script>
  202. </body>
  203. </html>