class ChartjsArea{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"}initboundariesExample(){var a=document.getElementById("boundaries-example"),e=a.getAttribute("data-colors"),e=e?e.split(","):this.defaultColors,a=a.getContext("2d"),a=new Chart(a,{type:"line",data:{labels:["Jan","Feb","March","April","May","June"],datasets:[{label:"Fully Rounded",data:[12.5,-19.4,14.3,-15,10.8,-10.5],borderColor:e[0],backgroundColor:hexToRGB(e[0],.3),fill:!1}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1,position:"top"}},scales:{x:{grid:{display:!1}},y:{grid:{display:!1}}}}});this.charts.push(a)}initdatasetExample(){var a=document.getElementById("dataset-example"),e=a.getAttribute("data-colors"),e=e?e.split(","):this.defaultColors,a=a.getContext("2d"),a=new Chart(a,{type:"line",data:{labels:["Jan","Feb","March","April","May","June"],datasets:[{label:"D0",data:[10,20,15,35,38,24],borderColor:e[0],hidden:!0,backgroundColor:hexToRGB(e[0],.3)},{label:"D1",data:[12,18,18,33,41,20],borderColor:e[1],fill:"-1",backgroundColor:hexToRGB(e[1],.3)},{label:"D2",data:[5,25,20,25,28,14],borderColor:e[2],fill:1,backgroundColor:hexToRGB(e[2],.3)},{label:"D3",data:[12,45,15,35,38,24],borderColor:e[3],fill:"-1",backgroundColor:hexToRGB(e[3],.3)},{label:"D4",data:[24,38,35,15,20,10],borderColor:e[4],fill:8,backgroundColor:hexToRGB(e[4],.3)}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{filler:{propagate:!1}},interaction:{intersect:!1},scales:{x:{grid:{display:!1}},y:{stacked:!0,grid:{display:!1}}}}});this.charts.push(a)}initdrawTimeExample(){var a=document.getElementById("draw-time-example"),e=a.getAttribute("data-colors"),e=e?e.split(","):this.defaultColors,a=a.getContext("2d"),a=new Chart(a,{type:"line",data:{labels:["Jan","Feb","March","April","May","June"],datasets:[{label:"Fully Rounded",data:[10,20,15,35,38,24],borderColor:e[0],backgroundColor:e[0],fill:!0},{label:"Small Radius",data:[24,38,35,15,20,10],backgroundColor:hexToRGB(e[1],.3),borderColor:e[1],borderWidth:1}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},filler:{propagate:!1}},pointBackgroundColor:"#fff",radius:5,interaction:{intersect:!1},scales:{x:{grid:{display:!1}},y:{grid:{display:!1}}}}});this.charts.push(a)}initstackedExample(){var a=document.getElementById("stacked-example"),e=a.getAttribute("data-colors"),e=e?e.split(","):this.defaultColors,a=a.getContext("2d"),a=new Chart(a,{type:"line",data:{labels:["Jan","Feb","March","April","May","June"],datasets:[{label:"D0",data:[10,20,15,35,38,24],borderColor:e[0],fill:!0,backgroundColor:e[0]},{label:"D1",data:[12,18,18,33,41,20],borderColor:e[1],fill:!0,backgroundColor:e[1]},{label:"D2",data:[5,25,20,25,28,14],borderColor:e[2],fill:!0,backgroundColor:e[2]},{label:"D3",data:[12,45,15,35,38,24],borderColor:e[3],fill:!0,backgroundColor:e[3]},{label:"D4",data:[24,38,35,15,20,10],borderColor:e[4],fill:!0,backgroundColor:e[4]}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},interaction:{mode:"nearest",axis:"x",intersect:!1},scales:{x:{title:{display:!0,text:"Month"},grid:{display:!1}},y:{stacked:!0,title:{display:!0,text:"Value"},grid:{display:!1}}}}});this.charts.push(a)}initradarExample(){var a=document.getElementById("radar-example"),e=a.getAttribute("data-colors"),e=e?e.split(","):this.defaultColors,a=a.getContext("2d"),a=new Chart(a,{type:"radar",data:{labels:["Jan","Feb","March","April","May","June"],datasets:[{label:"D0",data:[10,20,15,35,38,24],borderColor:e[0],fill:"-1",backgroundColor:hexToRGB(e[0],.3)},{label:"D1",data:[12,18,18,33,41,20],borderColor:e[1],fill:!1,backgroundColor:hexToRGB(e[1],.3)},{label:"D2",data:[5,25,20,25,28,14],borderColor:e[2],fill:"-1",backgroundColor:hexToRGB(e[2],.3)},{label:"D3",data:[12,45,15,35,38,24],borderColor:e[3],fill:"-1",backgroundColor:hexToRGB(e[3],.3)}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},filler:{propagate:!1}}}});this.charts.push(a)}init(){this.initboundariesExample(),this.initdatasetExample(),this.initdrawTimeExample(),this.initstackedExample(),this.initradarExample()}}function hexToRGB(a,e){var t=parseInt(a.slice(1,3),16),l=parseInt(a.slice(3,5),16),a=parseInt(a.slice(5,7),16);return e?"rgba("+t+", "+l+", "+a+", "+e+")":"rgb("+t+", "+l+", "+a+")"}(new ChartjsArea).init();