polar-area-monochrome.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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>Polar Area - Style 2</title>
  8. <link href="../../assets/styles.css" rel="stylesheet" />
  9. <style>
  10. #chart {
  11. padding: 0;
  12. max-width: 380px;
  13. margin: 35px auto;
  14. }
  15. </style>
  16. <script>
  17. window.Promise ||
  18. document.write(
  19. '<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"><\/script>'
  20. )
  21. window.Promise ||
  22. document.write(
  23. '<script src="https://cdn.jsdelivr.net/npm/eligrey-classlist-js-polyfill@1.2.20171210/classList.min.js"><\/script>'
  24. )
  25. window.Promise ||
  26. document.write(
  27. '<script src="https://cdn.jsdelivr.net/npm/findindex_polyfill_mdn"><\/script>'
  28. )
  29. </script>
  30. <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
  31. <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
  32. <script src="https://cdn.jsdelivr.net/npm/vue-apexcharts"></script>
  33. </head>
  34. <body>
  35. <div id="app">
  36. <div id="chart">
  37. <apexchart type="polarArea" width="380" :options="chartOptions" :series="series"></apexchart>
  38. </div>
  39. </div>
  40. <!-- Below element is just for displaying source code. it is not required. DO NOT USE -->
  41. <div id="html">
  42. &lt;div id=&quot;chart&quot;&gt;
  43. &lt;apexchart type=&quot;polarArea&quot; width=&quot;380&quot; :options=&quot;chartOptions&quot; :series=&quot;series&quot;&gt;&lt;/apexchart&gt;
  44. &lt;/div&gt;
  45. </div>
  46. <script>
  47. new Vue({
  48. el: '#app',
  49. components: {
  50. apexchart: VueApexCharts,
  51. },
  52. data: {
  53. series: [42, 47, 52, 58, 65],
  54. chartOptions: {
  55. chart: {
  56. width: 380,
  57. type: 'polarArea'
  58. },
  59. labels: ['Rose A', 'Rose B', 'Rose C', 'Rose D', 'Rose E'],
  60. fill: {
  61. opacity: 1
  62. },
  63. stroke: {
  64. width: 1,
  65. colors: undefined
  66. },
  67. yaxis: {
  68. show: false
  69. },
  70. legend: {
  71. position: 'bottom'
  72. },
  73. plotOptions: {
  74. polarArea: {
  75. rings: {
  76. strokeWidth: 0
  77. }
  78. }
  79. },
  80. theme: {
  81. monochrome: {
  82. enabled: true,
  83. shadeTo: 'light',
  84. shadeIntensity: 0.6
  85. }
  86. }
  87. },
  88. },
  89. })
  90. </script>
  91. </body>
  92. </html>