function getChartColorsArray(e){if(null!==document.getElementById(e)){e=document.getElementById(e).getAttribute("data-colors");return(e=JSON.parse(e)).map(function(e){var t=e.replace(" ","");if(-1===t.indexOf(",")){var r=getComputedStyle(document.documentElement).getPropertyValue(t);return r||t}e=e.split(",");return 2!=e.length?t:"rgba("+getComputedStyle(document.documentElement).getPropertyValue(e[0])+","+e[1]+")"})}}function ChartColorChange(t,r){document.querySelectorAll(".theme-color").forEach(function(e){e.addEventListener("click",function(e){setTimeout(()=>{var e=getChartColorsArray(r);t.updateOptions({colors:e})},0)})})}