1 line
8.2 KiB
JavaScript
1 line
8.2 KiB
JavaScript
|
!function(NioApp){"use strict";let earningsChart={labels:["M","T","W","T","F","S","S"],legend:!1,yAxis:!1,ticksColor:"#9CA3AF",ticksFontSize:11,ticksFontWeight:100,gridColorX:NioApp.Colors.white,gridColorY:NioApp.Colors.white,gridBorderColorX:NioApp.Colors.white,gridBorderColorY:NioApp.Colors.white,barThickness:6,datasets:[{borderRadius:10,borderWidth:1,color:NioApp.Colors.info,background:NioApp.Colors.info,hoverBackgroundColor:NioApp.Colors.info,label:"Earnings",data:[700,780,570,870,670,910,770]}]},totalClientsChart={labels:["Jan","Feb","Mar","Apr","May","Jun"],legend:!1,lineTension:.4,yAxis:!1,xAxis:!1,maxTicksLimit:4,datasets:[{label:"Total Clients",color:NioApp.Colors.success,backgroundGradient:NioApp.Colors.success,borderWidth:4,pointBorderColor:"transparent",pointBackgroundColor:"transparent",pointHoverBackgroundColor:NioApp.Colors.success,borderCapStyle:"round",data:[38,40,23,80,70,110]}]},projectsOverviewChart={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],legend:!1,stacked:!1,ticksColor:"#9CA3AF",ticksFontSize:11,ticksFontWeight:100,ticksValue:"k",gridBorderDash:[8,4],gridColorX:NioApp.Colors.white,gridColorY:NioApp.Colors.gray100,gridBorderColorX:NioApp.Colors.white,gridBorderColorY:NioApp.Colors.white,datasets:[{color:NioApp.Colors.primary,background:NioApp.Colors.primary,border:1,label:"Total Income",data:[120,160,95,105,98,99,167,140,155,267,237,250],order:1},{color:NioApp.Colors.warning,background:NioApp.Colors.warning,border:2,label:"Total Profit",data:[110,80,125,55,95,75,90,110,80,125,55,95],type:"line",order:0}]},avgEarningsChart={labels:["01 Jan","02 Jan","03 Jan","04 Jan","05 Jan","06 Jan","07 Jan","08 Jan","09 Jan","10 Jan","11 Jan","12 Jan","13 Jan","14 Jan","15 Jan"],legend:!1,lineTension:.4,ticksValue:"k",ticksColor:"#9CA3AF",ticksFontSize:11,ticksFontWeight:100,gridBorderDash:[8,4],xAxis:!1,gridColorX:NioApp.Colors.gray100,gridColorY:NioApp.Colors.gray100,gridBorderColorX:NioApp.Colors.gray100,gridBorderColorY:NioApp.Colors.white,datasets:[{label:"Avg Earnings",color:NioApp.Colors.success,backgroundGradient:NioApp.Colors.success,pointBackgroundColor:"transparent",borderWidth:2,pointBorderColor:"transparent",pointHoverBackgroundColor:NioApp.Colors.success,data:[55,105,100,115,150,145,190,150,200,190,230,200,256,234,300]}]};NioApp.Chart={tooltip:{rtl:NioApp.State.isRTL,textDirection:NioApp.State.isRTL?"rtl":"ltr",padding:12,boxWidth:10,boxHeight:10,boxPadding:6,backgroundColor:NioApp.Colors.gray100,titleColor:NioApp.Colors.gray900,bodyColor:NioApp.Colors.bodyColor},legend:{rtl:NioApp.State.isRTL,position:"top",labels:{boxWidth:12,boxHeight:12,fontColor:NioApp.Colors.bodyColor,padding:10}},bar:function(selector,data){let elm=document.querySelectorAll(selector);elm.forEach(item=>{let chartId=item.id,setData=void 0===data?eval(chartId):data,chartLegend=void 0!==setData.legend&&setData.legend,chartStacked=void 0!==setData.stacked&&setData.stacked,chartxAxis=void 0===setData.xAxis||setData.xAxis,chartyAxis=void 0===setData.yAxis||setData.yAxis,chartTicksColor=setData.ticksColor,chartTicksFontSize=setData.ticksFontSize,chartTicksFontWeight=setData.ticksFontWeight,chartMaxTicksLimit=setData.maxTicksLimit,chartTicksValue=void 0!==setData.ticksValue&&setData.ticksValue,chartGridColorX=setData.gridColorX,chartGridColorY=setData.gridColorY,chartGridBorderColorX=setData.gridBorderColorX,chartGridBorderColorY=setData.gridBorderColorY,chartGridBorderDash=setData.gridBorderDash,chartBarPercentage=void 0===setData.barPercentage?.1:setData.barPercentage,chartCategoryPercentage=void 0===setData.categoryPercentage?.1:setData.categoryPercentage,chartBarThickness=void 0===setData.barThickness?10:setData.barThickness,chartData=[];for(let t=0;t<setData.datasets.length;t++)chartData.push({label:setData.datasets[t].label,backgroundColor:void 0===setData.datasets[t].background?"transparent":setData.datasets[t].background,borderWidth:void 0===setData.datasets[t].border?1:setData.datasets[t].border,borderColor:setData.datasets[t].color,data:setData.datasets[t].data,borderRadius:void 0===se
|