function getChartColorsArray(e){e=$(e).attr("data-colors");return(e=JSON.parse(e)).map(function(e){e=e.replace(" ","");if(-1==e.indexOf("--"))return e;e=getComputedStyle(document.documentElement).getPropertyValue(e);return e||void 0})}var doughnutColors=getChartColorsArray("#doughnut-chart"),dom=document.getElementById("doughnut-chart"),myChart=echarts.init(dom),app={};option=null,option={tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"},legend:{orient:"horizontal",y:"bottom",data:["Total Sales","Target"],textStyle:{color:"#858d98"}},color:doughnutColors,series:[{name:"Total sales",type:"pie",radius:["30%","50%"],avoidLabelOverlap:!1,label:{normal:{show:!1,position:"center"},emphasis:{show:!0,textStyle:{fontSize:"20",fontWeight:"bold"}}},labelLine:{normal:{show:!1}},data:[{value:335,name:"Total Sales"},{value:310,name:"Target"}]}]},option&&"object"==typeof option&&myChart.setOption(option,!0);var splneAreaColors=getChartColorsArray("#spline_area"),options={chart:{height:300,type:"area",toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{curve:"smooth",width:3},series:[{name:"series1",data:[34,40,28,52,42,109,100]},{name:"series2",data:[32,60,34,46,34,52,41]}],colors:splneAreaColors,xaxis:{type:"datetime",categories:["2018-09-19T00:00:00","2018-09-19T01:30:00","2018-09-19T02:30:00","2018-09-19T03:30:00","2018-09-19T04:30:00","2018-09-19T05:30:00","2018-09-19T06:30:00"]},grid:{borderColor:"#f1f1f1"},tooltip:{x:{format:"dd/MM/yy HH:mm"}}},chart=new ApexCharts(document.querySelector("#spline_area"),options);chart.render(),ChartColorChange(chart,"#spline_area");options={series:[{data:[{x:"New Delhi",y:218},{x:"Kolkata",y:149},{x:"Mumbai",y:184},{x:"Ahmedabad",y:55},{x:"Bangaluru",y:84},{x:"Pune",y:31},{x:"Chennai",y:70},{x:"Jaipur",y:30},{x:"Surat",y:44},{x:"Hyderabad",y:68},{x:"Lucknow",y:28},{x:"Indore",y:19},{x:"Kanpur",y:29}]}],legend:{show:!1},chart:{height:352,type:"treemap",toolbar:{show:!1}},colors:["#A2D2FF","#9dc9f2","#9dc9f2","#9dc9f2","#9dc9f2","#9dc9f2","#7ab1d6","#7ab1d6","#7ab1d6","#7ab1d6","#9dc9f2","#9dc9f2"],plotOptions:{treemap:{distributed:!0,enableShades:!1}}};(chart=new ApexCharts(document.querySelector("#apex-chart"),options)).render();