!function(c){"use strict";var r=function(){this.$body=c("body"),this.charts=[]};r.prototype.respChart=function(a,t,e,o){var n=Chart.controllers.line.prototype.draw;Chart.controllers.line.prototype.draw=function(){n.apply(this,arguments);var r=this.chart.chart.ctx,a=r.stroke;r.stroke=function(){r.save(),r.shadowColor="rgba(0,0,0,0.01)",r.shadowBlur=20,r.shadowOffsetX=0,r.shadowOffsetY=5,a.apply(this,arguments),r.restore()}};var s=Chart.controllers.doughnut.prototype.draw;Chart.controllers.doughnut=Chart.controllers.doughnut.extend({draw:function(){s.apply(this,arguments);var r=this.chart.chart.ctx,a=r.fill;r.fill=function(){r.save(),r.shadowColor="rgba(0,0,0,0.03)",r.shadowBlur=4,r.shadowOffsetX=0,r.shadowOffsetY=3,a.apply(this,arguments),r.restore()}}});var l=Chart.controllers.bar.prototype.draw;Chart.controllers.bar=Chart.controllers.bar.extend({draw:function(){l.apply(this,arguments);var r=this.chart.chart.ctx,a=r.fill;r.fill=function(){r.save(),r.shadowColor="rgba(0,0,0,0.01)",r.shadowBlur=20,r.shadowOffsetX=4,r.shadowOffsetY=5,a.apply(this,arguments),r.restore()}}}),Chart.defaults.global.defaultFontColor="#8391a2",Chart.defaults.scale.gridLines.color="#8391a2";var i=a.get(0).getContext("2d"),d=c(a).parent();return function(){var r;switch(a.attr("width",c(d).width()),t){case"Line":r=new Chart(i,{type:"line",data:e,options:o});break;case"Doughnut":r=new Chart(i,{type:"doughnut",data:e,options:o});break;case"Pie":r=new Chart(i,{type:"pie",data:e,options:o});break;case"Bar":r=new Chart(i,{type:"bar",data:e,options:o});break;case"Radar":r=new Chart(i,{type:"radar",data:e,options:o});break;case"PolarArea":r=new Chart(i,{data:e,type:"polarArea",options:o})}return r}()},r.prototype.initCharts=function(){var r=[];if(0<c("#line-chart-example").length){r.push(this.respChart(c("#line-chart-example"),"Line",{labels:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],datasets:[{label:"Current Week",backgroundColor:"rgba(114, 124, 245, 0.3)",borderColor:"#727cf5",data:[32,42,42,62,52,75,62]},{label:"Previous Week",fill:!0,backgroundColor:"transparent",borderColor:"#0acf97",borderDash:[5,5],data:[42,58,66,93,82,105,92]}]},{maintainAspectRatio:!1,legend:{display:!1},tooltips:{intersect:!1},hover:{intersect:!0},plugins:{filler:{propagate:!1}},scales:{xAxes:[{reverse:!0,gridLines:{color:"rgba(0,0,0,0.05)"}}],yAxes:[{ticks:{stepSize:20},display:!0,borderDash:[5,5],gridLines:{color:"rgba(0,0,0,0)",fontColor:"#fff"}}]}}))}if(0<c("#bar-chart-example").length){var a=document.getElementById("bar-chart-example").getContext("2d").createLinearGradient(0,500,0,150);a.addColorStop(0,"#fa5c7c"),a.addColorStop(1,"#727cf5");var t={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],datasets:[{label:"Sales Analytics",backgroundColor:a,borderColor:a,hoverBackgroundColor:a,hoverBorderColor:a,data:[65,59,80,81,56,89,40,32,65,59,80,81]},{label:"Dollar Rate",backgroundColor:"#e3eaef",borderColor:"#e3eaef",hoverBackgroundColor:"#e3eaef",hoverBorderColor:"#e3eaef",data:[89,40,32,65,59,80,81,56,89,40,65,59]}]};r.push(this.respChart(c("#bar-chart-example"),"Bar",t,{maintainAspectRatio:!1,legend:{display:!1},scales:{yAxes:[{gridLines:{display:!1,color:"rgba(0,0,0,0.05)"},stacked:!1,ticks:{stepSize:20}}],xAxes:[{barPercentage:.7,categoryPercentage:.5,stacked:!1,gridLines:{color:"rgba(0,0,0,0.01)"}}]}}))}if(0<c("#donut-chart-example").length){r.push(this.respChart(c("#donut-chart-example"),"Doughnut",{labels:["Direct","Affilliate","Sponsored","E-mail"],datasets:[{data:[300,135,48,154],backgroundColor:["#727cf5","#fa5c7c","#0acf97","#ebeff2"],borderColor:"transparent",borderWidth:"3"}]},{maintainAspectRatio:!1,cutoutPercentage:60,legend:{display:!1}}))}if(0<c("#radar-chart-example").length){r.push(this.respChart(c("#radar-chart-example"),"Radar",{labels:["Eating","Drinking","Sleeping","Designing","Coding","Cycling","Running"],datasets:[{label:"Desktops",backgroundColor:"rgba(57,175,209,0.2)",borderColor:"#39afd1",pointBackgroundColor:"#39afd1",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"#39afd1",data:[65,59,90,81,56,55,40]},{label:"Tablets",backgroundColor:"rgba(161, 127, 224,0.2)",borderColor:"#a17fe0",pointBackgroundColor:"#a17fe0",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"#a17fe0",data:[28,48,40,19,96,27,100]}]},{maintainAspectRatio:!1}))}return r},r.prototype.init=function(){var a=this;Chart.defaults.global.defaultFontFamily='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',a.charts=this.initCharts(),c(window).on("resize",function(r){c.each(a.charts,function(r,a){try{a.destroy()}catch(r){}}),a.charts=a.initCharts()})},c.ChartJs=new r,c.ChartJs.Constructor=r}(window.jQuery),function(r){"use strict";window.jQuery.ChartJs.init()}();