1 line
9.0 KiB
JavaScript
1 line
9.0 KiB
JavaScript
|
!function(NioApp){"use strict";let visitorChart={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,datasets:[{borderRadius:10,borderWidth:1,color:"transparent",background:NioApp.hexRGB(NioApp.Colors.info,.3),hoverBackgroundColor:NioApp.Colors.info,label:"Visitors",data:[600,680,470,770,570,810,670]}]},activityChart={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],legend:!1,lineTension:.4,yAxis:!1,xAxis:!1,datasets:[{label:"Activity",color:NioApp.Colors.success,backgroundGradient:NioApp.Colors.success,pointBackgroundColor:NioApp.Colors.success,borderWidth:2,pointBorderColor:"transparent",pointHoverBackgroundColor:NioApp.Colors.success,data:[120,160,95,105,98,99,167,140,155,267,237,250]}]},totalProfitChart={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],legend:!1,stacked:!0,ticksColor:"#9CA3AF",ticksFontSize:11,ticksFontWeight:100,maxTicksLimit:20,ticksValue:"k",gridBorderDash:[8,4],gridColorX:NioApp.Colors.white,gridColorY:NioApp.Colors.gray100,gridBorderColorX:NioApp.Colors.white,gridBorderColorY:NioApp.Colors.white,datasets:[{borderRadius:{topLeft:50,topRight:50,bottomLeft:50,bottomRight:50},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]},{borderRadius:{topLeft:50,topRight:50,bottomLeft:50,bottomRight:50},color:NioApp.Colors.success,background:NioApp.Colors.success,border:1,label:"Total Profit",data:[110,80,125,55,95,75,90,110,80,125,55,95]},{borderRadius:{topLeft:50,topRight:50,bottomLeft:50,bottomRight:50},color:NioApp.Colors.gray300,background:NioApp.Colors.gray300,border:1,label:"Total Expense",data:[75,90,110,80,125,55,95,75,90,110,80,125]}]},totalRevenueChart={labels:["Jan","Feb","Mar","Apr","May","Jun"],legend:!1,lineTension:.4,yAxis:!1,xAxis:!1,datasets:[{label:"Total",color:NioApp.Colors.primary,backgroundColor:"transparent",borderWidth:4,pointBorderColor:"transparent",pointBackgroundColor:"transparent",pointHoverBackgroundColor:NioApp.Colors.primary,borderCapStyle:"round",data:[12,40,13,130,70,210]}]},salesAnalyticsChart={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],legend:!1,lineTension:.4,ticksValue:"k",ticksColor:"#9CA3AF",ticksFontSize:11,ticksFontWeight:100,gridBorderDash:[8,4],maxTicksLimit:10,xAxis:!1,gridColorX:NioApp.Colors.white,gridColorY:NioApp.Colors.gray100,gridBorderColorX:NioApp.Colors.white,gridBorderColorY:NioApp.Colors.white,datasets:[{borderWidth:3,color:NioApp.Colors.yellow,backgroundGradient:NioApp.Colors.yellow,pointBorderColor:"transparent",pointBackgroundColor:"transparent",pointHoverBackgroundColor:NioApp.Colors.yellow,label:"Total Sales",data:[40,60,30,65,60,95,90,100,96,120,105,134]},{borderWidth:2,pointBorderColor:"transparent",pointBackgroundColor:"transparent",color:NioApp.Colors.danger,pointHoverBackgroundColor:NioApp.Colors.danger,label:"Total Orders",borderDash:[8,4],data:[70,44,49,78,39,49,39,38,59,80,56,101]}]};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.maxTicksLim
|