apexcharts.init.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. //Chart 1
  2. var options = {
  3. series: [{
  4. data: [20, 45, 40, 64, 35, 25, 35]
  5. }],
  6. chart: {
  7. type: 'area',
  8. height: 90,
  9. width: '100%',
  10. sparkline: {
  11. enabled: true
  12. }
  13. },
  14. stroke: {
  15. curve: 'smooth',
  16. width: 3,
  17. },
  18. colors: ['#52cc99'],
  19. fill: {
  20. type: 'gradient',
  21. gradient: {
  22. shadeIntensity: 1,
  23. inverseColors: false,
  24. opacityFrom: 0.45,
  25. opacityTo: 0.05,
  26. stops: [20, 100, 100, 100]
  27. },
  28. },
  29. tooltip: {
  30. fixed: {
  31. enabled: false
  32. },
  33. x: {
  34. show: false
  35. },
  36. y: {
  37. title: {
  38. formatter: function (seriesName) {
  39. return ''
  40. }
  41. }
  42. },
  43. marker: {
  44. show: false
  45. }
  46. }
  47. };
  48. var chart = new ApexCharts(document.querySelector("#chart-1"), options);
  49. chart.render();
  50. //chart 2
  51. var options = {
  52. series: [{
  53. data: [10, 25, 30, 54, 45, 39, 15]
  54. }],
  55. chart: {
  56. type: 'area',
  57. height: 90,
  58. width: '100%',
  59. sparkline: {
  60. enabled: true
  61. }
  62. },
  63. stroke: {
  64. curve: 'smooth',
  65. width: 3,
  66. },
  67. colors: ['#ff6647'],
  68. fill: {
  69. type: 'gradient',
  70. gradient: {
  71. shadeIntensity: 1,
  72. inverseColors: false,
  73. opacityFrom: 0.45,
  74. opacityTo: 0.05,
  75. stops: [20, 100, 100, 100]
  76. },
  77. },
  78. tooltip: {
  79. fixed: {
  80. enabled: false
  81. },
  82. x: {
  83. show: false
  84. },
  85. y: {
  86. title: {
  87. formatter: function (seriesName) {
  88. return ''
  89. }
  90. }
  91. },
  92. marker: {
  93. show: false
  94. }
  95. }
  96. };
  97. var chart = new ApexCharts(document.querySelector("#chart-2"), options);
  98. chart.render();
  99. //Chart 3
  100. var options = {
  101. series: [{
  102. data: [15, 20, 10, 45, 20, 10, 5]
  103. }],
  104. chart: {
  105. type: 'area',
  106. height: 90,
  107. width: '100%',
  108. sparkline: {
  109. enabled: true
  110. }
  111. },
  112. stroke: {
  113. curve: 'smooth',
  114. width: 3,
  115. },
  116. colors: ['#52cc99'],
  117. fill: {
  118. type: 'gradient',
  119. gradient: {
  120. shadeIntensity: 1,
  121. inverseColors: false,
  122. opacityFrom: 0.45,
  123. opacityTo: 0.05,
  124. stops: [20, 100, 100, 100]
  125. },
  126. },
  127. tooltip: {
  128. fixed: {
  129. enabled: false
  130. },
  131. x: {
  132. show: false
  133. },
  134. y: {
  135. title: {
  136. formatter: function (seriesName) {
  137. return ''
  138. }
  139. }
  140. },
  141. marker: {
  142. show: false
  143. }
  144. }
  145. };
  146. var chart = new ApexCharts(document.querySelector("#chart-3"), options);
  147. chart.render();
  148. //Chart 4
  149. var options = {
  150. series: [{
  151. data: [3, 5, 7, 11, 8, 5, 7]
  152. }],
  153. chart: {
  154. type: 'area',
  155. height: 90,
  156. width: '100%',
  157. sparkline: {
  158. enabled: true
  159. }
  160. },
  161. stroke: {
  162. curve: 'smooth',
  163. width: 3,
  164. },
  165. colors: ['#ff6647'],
  166. fill: {
  167. type: 'gradient',
  168. gradient: {
  169. shadeIntensity: 1,
  170. inverseColors: false,
  171. opacityFrom: 0.45,
  172. opacityTo: 0.05,
  173. stops: [20, 100, 100, 100]
  174. },
  175. },
  176. tooltip: {
  177. fixed: {
  178. enabled: false
  179. },
  180. x: {
  181. show: false
  182. },
  183. y: {
  184. title: {
  185. formatter: function (seriesName) {
  186. return ''
  187. }
  188. }
  189. },
  190. marker: {
  191. show: false
  192. }
  193. }
  194. };
  195. var chart = new ApexCharts(document.querySelector("#chart-4"), options);
  196. chart.render();