text: let chartValue=JSON.parse($('meta[name="chart-value"]').attr("content")),type=$('meta[name="type"]').attr("content"),labels=[];function number_format(t,e,a,r){t=(t+"").replace(",","").replace(" ","");var o=isFinite(+t)?+t:0,n=isFinite(+e)?Math.abs(e):0,l=void 0===r?",":r,i=void 0===a?".":a,d="";return(d=(n?function(t,e){var a=Math.pow(10,e);return""+Math.round(t*a)/a}(o,n):""+Math.round(o)).split("."))[0].length>3&&(d[0]=d[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,l)),(d[1]||"").length<n&&(d[1]=d[1]||"",d[1]+=new Array(n-d[1].length+1).join("0")),d.join(i)}labels="daily"===type?JSON.parse($('meta[name="days"]').attr("content")):"weekly"===type?JSON.parse($('meta[name="weeks"]').attr("content")):["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],$("#admin-table").DataTable(),$("#chart-type").change(function(t){let e=$(this).children("option:selected").val();location.href=`/admin/dashboard/${e}`}),Chart.defaults.global.defaultFontFamily="Nunito",Chart.defaults.global.defaultFontColor="#858796";var ctx=document.getElementById("myAreaChart");Chart.defaults.global.defaultFontFamily="Poppins";var myLineChart=new Chart(ctx,{type:"line",data:{labels:labels,datasets:[{label:"",lineTension:.3,backgroundColor:"rgba(78, 115, 223, 0.05)",borderColor:"rgba(78, 115, 223, 1)",pointRadius:3,pointBackgroundColor:"rgba(78, 115, 223, 1)",pointBorderColor:"rgba(78, 115, 223, 1)",pointHoverRadius:3,pointHoverBackgroundColor:"rgba(78, 115, 223, 1)",pointHoverBorderColor:"rgba(78, 115, 223, 1)",pointHitRadius:10,pointBorderWidth:2,data:Object.values(chartValue)}]},options:{maintainAspectRatio:!1,layout:{padding:{left:10,right:25,top:25,bottom:0}},scales:{xAxes:[{time:{unit:"date"},gridLines:{display:!1,drawBorder:!1},ticks:{maxTicksLimit:12}}],yAxes:[{ticks:{maxTicksLimit:5,padding:10,callback:function(t,e,a){return number_format(t)}},gridLines:{color:"rgb(234, 236, 244)",zeroLineColor:"rgb(234, 236, 244)",drawBorder:!1,borderDash:[2],zeroLineBorderDash:[2]}}]},legend:{display:!1},tooltips:{backgroundColor:"rgb(255,255,255)",bodyFontColor:"#858796",titleMarginBottom:10,titleFontColor:"#6e707e",titleFontSize:14,borderColor:"#dddfeb",borderWidth:1,xPadding:15,yPadding:15,displayColors:!1,intersect:!1,mode:"index",caretPadding:10,callbacks:{label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+"Students : "+number_format(t.yLabel)}}}}});