function getChartColorsArray(r){if(null!==document.getElementById(r)){var o=document.getElementById(r).getAttribute("data-colors");if(o)return(o=JSON.parse(o)).map(function(r){var o=r.replace(" ","");if(-1===o.indexOf(",")){var e=getComputedStyle(document.documentElement).getPropertyValue(o);return e||o}var t=r.split(",");return 2!=t.length?o:"rgba("+getComputedStyle(document.documentElement).getPropertyValue(t[0])+","+t[1]+")"});console.warn("data-colors Attribute not found on:",r)}}!function(p){"use strict";function r(){}r.prototype.respChart=function(r,o,e,t){Chart.defaults.global.defaultFontColor="#8791af",Chart.defaults.scale.gridLines.color="rgba(108, 120, 151, 0.1)";var a=r.get(0).getContext("2d"),n=p(r).parent();function l(){r.attr("width",p(n).width());switch(o){case"Line":new Chart(a,{type:"line",data:e,options:t});break;case"Doughnut":new Chart(a,{type:"doughnut",data:e,options:t});break;case"Pie":new Chart(a,{type:"pie",data:e,options:t});break;case"Bar":new Chart(a,{type:"bar",data:e,options:t});break;case"Radar":new Chart(a,{type:"radar",data:e,options:t});break;case"PolarArea":new Chart(a,{data:e,type:"polarArea",options:t})}}p(window).resize(l),l()},r.prototype.init=function(){var r=getChartColorsArray("lineChart"),o={labels:["January","February","March","April","May","June","July","August","September","October"],datasets:[{label:"Sales Analytics",fill:!0,lineTension:.5,backgroundColor:r[1],borderColor:r[0],borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",pointBorderColor:r[0],pointBackgroundColor:r[0],pointBorderWidth:1,pointHoverRadius:5,pointHoverBackgroundColor:r[0],pointHoverBorderColor:r[2],pointHoverBorderWidth:2,pointRadius:1,pointHitRadius:10,data:[65,59,80,81,56,55,40,55,30,80]},{label:"Monthly Earnings",fill:!0,lineTension:.5,backgroundColor:r[3],borderColor:r[2],borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",pointBorderColor:r[2],pointBackgroundColor:r[2],pointBorderWidth:1,pointHoverRadius:5,pointHoverBackgroundColor:r[2],pointHoverBorderColor:r[2],pointHoverBorderWidth:2,pointRadius:1,pointHitRadius:10,data:[80,23,56,65,23,35,85,25,92,36]}]};this.respChart(p("#lineChart"),"Line",o,{scales:{yAxes:[{ticks:{max:100,min:20,stepSize:10}}]}});var e=getChartColorsArray("doughnut"),t={labels:["Desktops","Tablets"],datasets:[{data:[300,210],backgroundColor:e,hoverBackgroundColor:e,hoverBorderColor:e}]};this.respChart(p("#doughnut"),"Doughnut",t);var a=getChartColorsArray("pie"),n={labels:["Desktops","Tablets"],datasets:[{data:[300,180],backgroundColor:[a[0],a[1]],hoverBackgroundColor:[a[0],a[1]],hoverBorderColor:"#fff"}]};this.respChart(p("#pie"),"Pie",n);var l=getChartColorsArray("bar"),i={labels:["January","February","March","April","May","June","July"],datasets:[{label:"Sales Analytics",backgroundColor:l[0],borderColor:l[0],borderWidth:1,hoverBackgroundColor:l[0],hoverBorderColor:l[0],data:[65,59,81,45,56,80,50,20]}]};this.respChart(p("#bar"),"Bar",i);var d=getChartColorsArray("radar"),s={labels:["Eating","Drinking","Sleeping","Designing","Coding","Cycling","Running"],datasets:[{label:"Desktops",backgroundColor:d[0],borderColor:d[1],pointBackgroundColor:d[1],pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:d[1],data:[65,59,90,81,56,55,40]},{label:"Tablets",backgroundColor:d[2],borderColor:d[3],pointBackgroundColor:d[3],pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:d[3],data:[28,48,40,19,96,27,100]}]};this.respChart(p("#radar"),"Radar",s);var u=getChartColorsArray("polarArea"),C={datasets:[{data:[11,16,7,18],backgroundColor:[u[0],u[1],u[2],u[3]],label:"My dataset",hoverBorderColor:"#fff"}],labels:["Series 1","Series 2","Series 3","Series 4"]};this.respChart(p("#polarArea"),"PolarArea",C)},p.ChartJs=new r,p.ChartJs.Constructor=r}(window.jQuery),function(){"use strict";window.jQuery.ChartJs.init()}();