function getChartColorsArray(e){if(null!==document.getElementById(e)){var t=document.getElementById(e).getAttribute("data-colors");return(t=JSON.parse(t)).map((function(e){var t=e.replace(" ","");if(-1===t.indexOf(",")){var r=getComputedStyle(document.documentElement).getPropertyValue(t);return r||t}var a=e.split(",");if(2==a.length){var o=getComputedStyle(document.documentElement).getPropertyValue(a[0]);return o="rgba("+o+","+a[1]+")"}return t}))}}function createSparklineChart(e,t,r){var a=getChartColorsArray(t),o=a?a[0]:"#38c66c",n={chart:{type:"area",height:70,width:120,sparkline:{enabled:!0}},series:[{name:"Customers",data:r}],stroke:{curve:"smooth",width:3,dashArray:2},fill:{type:"gradient",gradient:{shade:"light",type:"vertical",shadeIntensity:.8,opacityFrom:.3,opacityTo:0,gradientToColors:[o],stops:[0,100]}},colors:[o],tooltip:{enabled:!0,theme:"dark",marker:{show:!0}},grid:{show:!1,padding:{bottom:-10}}};new ApexCharts(document.querySelector(e),n).render()}createSparklineChart("#customersChart","customersChart",[7,18,14,22,20,13,25,32]),createSparklineChart("#newCustomersChart","newCustomersChart",[7,18,14,22,20,13,25,32]),createSparklineChart("#activeCustomersChart","activeCustomersChart",[7,18,14,22,20,13,25,32]),createSparklineChart("#returningCustomersChart","returningCustomersChart",[7,18,14,22,20,13,25,32]),createSparklineChart("#churnedCustomersChart","churnedCustomersChart",[7,18,14,22,20,13,25,32]);