polar-area-monochrome.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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/apexcharts"></script>
  31. </head>
  32. <body>
  33. <div id="chart"></div>
  34. <script>
  35. var options = {
  36. series: [42, 47, 52, 58, 65],
  37. chart: {
  38. width: 380,
  39. type: 'polarArea'
  40. },
  41. labels: ['Rose A', 'Rose B', 'Rose C', 'Rose D', 'Rose E'],
  42. fill: {
  43. opacity: 1
  44. },
  45. stroke: {
  46. width: 1,
  47. colors: undefined
  48. },
  49. yaxis: {
  50. show: false
  51. },
  52. legend: {
  53. position: 'bottom'
  54. },
  55. plotOptions: {
  56. polarArea: {
  57. rings: {
  58. strokeWidth: 0
  59. }
  60. }
  61. },
  62. theme: {
  63. monochrome: {
  64. enabled: true,
  65. shadeTo: 'light',
  66. shadeIntensity: 0.6
  67. }
  68. }
  69. };
  70. var chart = new ApexCharts(document.querySelector("#chart"), options);
  71. chart.render();
  72. </script>
  73. </body>
  74. </html>