circle-chart-multiple.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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>Circle Gauge Chart - Multiple</title>
  8. <link href="../../assets/styles.css" rel="stylesheet" />
  9. <style>
  10. #chart {
  11. padding: 0;
  12. max-width: 650px;
  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: [44, 55, 67, 83],
  37. chart: {
  38. height: 350,
  39. type: 'radialBar',
  40. },
  41. plotOptions: {
  42. radialBar: {
  43. dataLabels: {
  44. name: {
  45. fontSize: '22px',
  46. },
  47. value: {
  48. fontSize: '16px',
  49. },
  50. total: {
  51. show: true,
  52. label: 'Total',
  53. formatter: function (w) {
  54. // By default this function returns the average of all series. The below is just an example to show the use of custom formatter function
  55. return 249
  56. }
  57. }
  58. }
  59. }
  60. },
  61. labels: ['Apples', 'Oranges', 'Bananas', 'Berries'],
  62. };
  63. var chart = new ApexCharts(document.querySelector("#chart"), options);
  64. chart.render();
  65. </script>
  66. </body>
  67. </html>