class ChartjsOther{constructor(){this.body=document.getElementsByTagName("body")[0],this.charts=[],this.defaultColors=["#3e60d5","#47ad77","#fa5c7c","#ffbc00"],Chart.defaults.font.family='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',Chart.defaults.color="#8391a2",Chart.defaults.scale.grid.color="#8391a2"}initBubbleExample(){var t=document.getElementById("bubble-example"),a=t.getAttribute("data-colors"),a=a?a.split(","):this.defaultColors,t=t.getContext("2d"),t=new Chart(t,{type:"bubble",data:{labels:["Jan","Feb","March","April","May","June"],datasets:[{label:"Fully Rounded",data:[{x:10,y:20,r:5},{x:20,y:10,r:5},{x:15,y:15,r:5}],borderColor:a[0],backgroundColor:hexToRGB(a[0],.3),borderWidth:2,borderSkipped:!1},{label:"Small Radius",data:[{x:12,y:22},{x:22,y:20},{x:5,y:15}],backgroundColor:hexToRGB(a[1],.3),borderColor:a[1],borderWidth:2,borderSkipped:!1}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1,position:"top"}},scales:{x:{grid:{display:!1}},y:{grid:{display:!1}}}}});this.charts.push(t)}initDonutExample(){var t=document.getElementById("donut-example"),a=t.getAttribute("data-colors"),a=a?a.split(","):this.defaultColors,t=t.getContext("2d"),t=new Chart(t,{type:"doughnut",data:{labels:["Direct","Affilliate","Sponsored","E-mail"],datasets:[{data:[300,135,48,154],backgroundColor:a,borderColor:"transparent",borderWidth:"3"}]},options:{responsive:!0,maintainAspectRatio:!1,cutoutPercentage:60,plugins:{legend:{display:!1,position:"top"}}}});this.charts.push(t)}initPieExample(){var t=document.getElementById("pie-example"),a=t.getAttribute("data-colors"),a=a?a.split(","):this.defaultColors,t=t.getContext("2d"),t=new Chart(t,{type:"pie",data:{labels:["Jan","Feb","March","April","May"],datasets:[{label:"Fully Rounded",data:[12,19,14,15,40],backgroundColor:a}]},options:{indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}}}});this.charts.push(t)}initPolarAreaExample(){var t=document.getElementById("polar-area-example"),a=t.getAttribute("data-colors"),a=a?a.split(","):this.defaultColors,t=t.getContext("2d"),t=new Chart(t,{type:"polarArea",data:{labels:["Jan","Feb","March","April","May"],datasets:[{label:"Dataset 1",data:[12,19,14,15,20],backgroundColor:a}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1,position:"top"}},scales:{r:{display:!1}}}});this.charts.push(t)}initRadarExample(){var t=document.getElementById("radar-example"),a=t.getAttribute("data-colors"),a=a?a.split(","):this.defaultColors,t=t.getContext("2d"),t=new Chart(t,{type:"radar",data:{labels:["Jan","Feb","March","April","May","June"],datasets:[{label:"Dataset 1",data:[12,29,39,22,28,34],borderColor:a[0],backgroundColor:hexToRGB(a[0],.3)},{label:"Dataset 2",data:[10,19,15,28,34,39],borderColor:a[1],backgroundColor:hexToRGB(a[1],.3)}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}}}});this.charts.push(t)}initScatterExample(){var t=document.getElementById("scatter-example"),a=t.getAttribute("data-colors"),a=a?a.split(","):this.defaultColors,t=t.getContext("2d"),t=new Chart(t,{type:"scatter",data:{labels:["Jan","Feb","March","April","May","June","July"],datasets:[{label:"Dataset 1",data:[{x:10,y:50},{x:50,y:10},{x:15,y:15},{x:20,y:45},{x:25,y:18},{x:34,y:38}],borderColor:a[0],backgroundColor:hexToRGB(a[0],.3)},{label:"Dataset 2",data:[{x:15,y:45},{x:40,y:20},{x:30,y:5},{x:35,y:25},{x:18,y:25},{x:40,y:8}],borderColor:a[1],backgroundColor:hexToRGB(a[1],.3)}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1}},y:{grid:{display:!1}}}}});this.charts.push(t)}initBarLineExample(){var t=document.getElementById("bar-line-example"),a=t.getAttribute("data-colors"),a=a?a.split(","):this.defaultColors,t=t.getContext("2d"),t=new Chart(t,{type:"line",data:{labels:["Jan","Feb","March","April","May","June","July"],datasets:[{label:"Dataset 1",data:[10,20,35,18,15,25,22],backgroundColor:a[0],stack:"combined",type:"bar"},{label:"Dataset 2",data:[13,23,38,22,25,30,28],borderColor:a[1],stack:"combined"}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1}},y:{stacked:!0,grid:{display:!1}}}}});this.charts.push(t)}init(){this.initBubbleExample(),this.initDonutExample(),this.initPieExample(),this.initPolarAreaExample(),this.initRadarExample(),this.initBarLineExample(),this.initScatterExample()}}function hexToRGB(t,a){var e=parseInt(t.slice(1,3),16),l=parseInt(t.slice(3,5),16),t=parseInt(t.slice(5,7),16);return a?"rgba("+e+", "+l+", "+t+", "+a+")":"rgb("+e+", "+l+", "+t+")"}(new ChartjsOther).init();