new CustomApexChart({selector:"#simple-pie",options:()=>({chart:{height:320,type:"pie"},series:[36,28,18,12,6],labels:["Brand A","Brand B","Brand C","Brand D","Brand E"],legend:{show:!0,position:"bottom",horizontalAlign:"center",verticalAlign:"middle",floating:!1,fontSize:"14px",offsetX:0,offsetY:5},dataLabels:{enabled:!0,style:{fontSize:"14px",fontWeight:500}},colors:[ins("primary"),ins("warning"),ins("danger"),ins("info"),ins("secondary")],responsive:[{breakpoint:600,options:{chart:{height:240},legend:{show:!1}}}]})}),new CustomApexChart({selector:"#simple-donut",options:()=>({chart:{height:320,type:"donut"},series:[48,32,28,15,7],legend:{show:!0,position:"bottom",horizontalAlign:"center",verticalAlign:"middle",floating:!1,fontSize:"14px",offsetX:0,offsetY:5},labels:["Organic Search","Direct","Referral","Social Media","Email"],colors:[ins("secondary"),ins("purple"),ins("info"),ins("gray"),ins("light")],dataLabels:{enabled:!0,style:{fontSize:"14px",fontWeight:500}},responsive:[{breakpoint:600,options:{chart:{height:240},legend:{show:!1}}}]})}),new CustomApexChart({selector:"#monochrome-pie",options:()=>({chart:{height:320,type:"pie"},series:[120,90,150,180,160,70],labels:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],legend:{show:!0,position:"bottom",horizontalAlign:"center",verticalAlign:"middle",floating:!1,fontSize:"14px",offsetX:0,offsetY:5},dataLabels:{enabled:!0,style:{fontSize:"14px",fontWeight:500}},theme:{monochrome:{enabled:!0}},responsive:[{breakpoint:600,options:{chart:{height:240},legend:{show:!1}}}]})}),new CustomApexChart({selector:"#gradient-donut",options:()=>({chart:{height:320,type:"donut"},series:[38,26,18,12,6],legend:{show:!0,position:"bottom",horizontalAlign:"center",verticalAlign:"middle",floating:!1,fontSize:"14px",offsetX:0,offsetY:5},labels:["Social","Productivity","Entertainment","Education","Health"],colors:[ins("primary"),ins("orange"),ins("danger"),ins("info"),ins("secondary")],dataLabels:{enabled:!0,style:{fontSize:"14px",fontWeight:500}},responsive:[{breakpoint:600,options:{chart:{height:240},legend:{show:!1}}}],fill:{type:"gradient"}})}),new CustomApexChart({selector:"#patterned-donut",options:()=>({chart:{height:320,type:"donut",dropShadow:{enabled:!0,color:"#111",top:-1,left:3,blur:3,opacity:.2}},stroke:{show:!0,width:2},series:[38,27,18,12,5],labels:["Netflix","YouTube","Amazon Prime","Disney+","HBO Max"],dataLabels:{enabled:!1},fill:{type:"pattern",opacity:1,pattern:{enabled:!0,style:["circles","slantedLines","verticalLines","horizontalLines","squares"]}},states:{hover:{enabled:!1}},legend:{show:!0,position:"bottom",horizontalAlign:"center",verticalAlign:"middle",floating:!1,fontSize:"14px",offsetX:0,offsetY:5},responsive:[{breakpoint:600,options:{chart:{height:240},legend:{show:!1}}}]})}),new CustomApexChart({selector:"#image-pie",options:()=>({chart:{height:320,type:"pie"},labels:["Apple","Tesla","Amazon","Google"],series:[30,44,60,39],fill:{type:"image",opacity:.85,image:{src:["assets/images/stock/small-1.jpg","assets/images/stock/small-2.jpg","assets/images/stock/small-3.jpg","assets/images/stock/small-4.jpg"],width:25,imagedHeight:25}},stroke:{width:4},dataLabels:{enabled:!1},legend:{show:!0,position:"bottom",horizontalAlign:"center",verticalAlign:"middle",floating:!1,fontSize:"14px",offsetX:0,offsetY:7},responsive:[{breakpoint:600,options:{chart:{height:240},legend:{show:!1}}}]})});let getOptions=()=>({chart:{height:320,type:"donut"},dataLabels:{enabled:!1},series:[64,75,33,53],legend:{show:!0,position:"bottom",horizontalAlign:"center",verticalAlign:"middle",floating:!1,fontSize:"14px",offsetX:0,offsetY:7},colors:[ins("purple"),ins("warning"),ins("danger"),ins("info")],responsive:[{breakpoint:600,options:{chart:{height:240},legend:{show:!1}}}]}),updateChart=new CustomApexChart({selector:"#update-donut",options:getOptions});function appendData(){var e=updateChart.chart.w.globals.series.map(function(){return Math.floor(100*Math.random())+1});return e.push(Math.floor(100*Math.random())+1),e}function removeData(){var e=updateChart.chart.w.globals.series.map(function(){return Math.floor(100*Math.random())+1});return e.pop(),e}function randomize(){return updateChart.chart.w.globals.series.map(function(){return Math.floor(100*Math.random())+1})}function reset(){return getOptions().series}document.querySelector("#randomize").addEventListener("click",function(){updateChart.chart.updateSeries(randomize())}),document.querySelector("#add").addEventListener("click",function(){updateChart.chart.updateSeries(appendData())}),document.querySelector("#remove").addEventListener("click",function(){updateChart.chart.updateSeries(removeData())}),document.querySelector("#reset").addEventListener("click",function(){updateChart.chart.updateSeries(reset())});