area-with-missing-data.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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/apexcharts"></script>
  30. </head>
  31. <body>
  32. <div id="chart"></div>
  33. <script>
  34. var options = {
  35. series: [{
  36. name: 'Network',
  37. data: [{
  38. x: 'Dec 23 2017',
  39. y: null
  40. },
  41. {
  42. x: 'Dec 24 2017',
  43. y: 44
  44. },
  45. {
  46. x: 'Dec 25 2017',
  47. y: 31
  48. },
  49. {
  50. x: 'Dec 26 2017',
  51. y: 38
  52. },
  53. {
  54. x: 'Dec 27 2017',
  55. y: null
  56. },
  57. {
  58. x: 'Dec 28 2017',
  59. y: 32
  60. },
  61. {
  62. x: 'Dec 29 2017',
  63. y: 55
  64. },
  65. {
  66. x: 'Dec 30 2017',
  67. y: 51
  68. },
  69. {
  70. x: 'Dec 31 2017',
  71. y: 67
  72. },
  73. {
  74. x: 'Jan 01 2018',
  75. y: 22
  76. },
  77. {
  78. x: 'Jan 02 2018',
  79. y: 34
  80. },
  81. {
  82. x: 'Jan 03 2018',
  83. y: null
  84. },
  85. {
  86. x: 'Jan 04 2018',
  87. y: null
  88. },
  89. {
  90. x: 'Jan 05 2018',
  91. y: 11
  92. },
  93. {
  94. x: 'Jan 06 2018',
  95. y: 4
  96. },
  97. {
  98. x: 'Jan 07 2018',
  99. y: 15,
  100. },
  101. {
  102. x: 'Jan 08 2018',
  103. y: null
  104. },
  105. {
  106. x: 'Jan 09 2018',
  107. y: 9
  108. },
  109. {
  110. x: 'Jan 10 2018',
  111. y: 34
  112. },
  113. {
  114. x: 'Jan 11 2018',
  115. y: null
  116. },
  117. {
  118. x: 'Jan 12 2018',
  119. y: null
  120. },
  121. {
  122. x: 'Jan 13 2018',
  123. y: 13
  124. },
  125. {
  126. x: 'Jan 14 2018',
  127. y: null
  128. }
  129. ],
  130. }],
  131. chart: {
  132. type: 'area',
  133. height: 350,
  134. animations: {
  135. enabled: false
  136. },
  137. zoom: {
  138. enabled: false
  139. },
  140. },
  141. dataLabels: {
  142. enabled: false
  143. },
  144. stroke: {
  145. curve: 'straight'
  146. },
  147. fill: {
  148. opacity: 0.8,
  149. type: 'pattern',
  150. pattern: {
  151. style: ['verticalLines', 'horizontalLines'],
  152. width: 5,
  153. height: 6
  154. },
  155. },
  156. markers: {
  157. size: 5,
  158. hover: {
  159. size: 9
  160. }
  161. },
  162. title: {
  163. text: 'Network Monitoring',
  164. },
  165. tooltip: {
  166. intersect: true,
  167. shared: false
  168. },
  169. theme: {
  170. palette: 'palette1'
  171. },
  172. xaxis: {
  173. type: 'datetime',
  174. },
  175. yaxis: {
  176. title: {
  177. text: 'Bytes Received'
  178. }
  179. }
  180. };
  181. var chart = new ApexCharts(document.querySelector("#chart"), options);
  182. chart.render();
  183. </script>
  184. </body>
  185. </html>