file-manager.init.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /******/ (function() { // webpackBootstrap
  2. var __webpack_exports__ = {};
  3. /*!*************************************************!*\
  4. !*** ./resources/js/pages/file-manager.init.js ***!
  5. \*************************************************/
  6. /*
  7. Template Name: Skote - Admin & Dashboard Template
  8. Author: Themesbrand
  9. Website: https://themesbrand.com/
  10. Contact: themesbrand@gmail.com
  11. File: file manager Init Js File
  12. */
  13. // get colors array from the string
  14. function getChartColorsArray(chartId) {
  15. if (document.getElementById(chartId) !== null) {
  16. var colors = document.getElementById(chartId).getAttribute("data-colors");
  17. if (colors) {
  18. colors = JSON.parse(colors);
  19. return colors.map(function (value) {
  20. var newValue = value.replace(" ", "");
  21. if (newValue.indexOf(",") === -1) {
  22. var color = getComputedStyle(document.documentElement).getPropertyValue(newValue);
  23. if (color){
  24. color = color.replace(" ", "");
  25. return color;
  26. }
  27. else return newValue;;
  28. } else {
  29. var val = value.split(',');
  30. if (val.length == 2) {
  31. var rgbaColor = getComputedStyle(document.documentElement).getPropertyValue(val[0]);
  32. rgbaColor = "rgba(" + rgbaColor + "," + val[1] + ")";
  33. return rgbaColor;
  34. } else {
  35. return newValue;
  36. }
  37. }
  38. });
  39. }
  40. }
  41. }
  42. var radialChartColors = getChartColorsArray("radial-chart");
  43. if (radialChartColors) {
  44. var options = {
  45. series: [76],
  46. chart: {
  47. height: 150,
  48. type: 'radialBar',
  49. sparkline: {
  50. enabled: true
  51. }
  52. },
  53. colors: ['#556ee6'],
  54. plotOptions: {
  55. radialBar: {
  56. startAngle: -90,
  57. endAngle: 90,
  58. track: {
  59. background: "#e7e7e7",
  60. strokeWidth: '97%',
  61. margin: 5 // margin is in pixels
  62. },
  63. hollow: {
  64. size: '60%'
  65. },
  66. dataLabels: {
  67. name: {
  68. show: false
  69. },
  70. value: {
  71. offsetY: -2,
  72. fontSize: '16px'
  73. }
  74. }
  75. }
  76. },
  77. grid: {
  78. padding: {
  79. top: -10
  80. }
  81. },
  82. stroke: {
  83. dashArray: 3
  84. },
  85. labels: ['Storage']
  86. };
  87. var chart = new ApexCharts(document.querySelector("#radial-chart"), options);
  88. chart.render();
  89. }
  90. /******/ })()
  91. ;