function isNumeric(a){return!isNaN(parseFloat(a))&&isFinite(a)}
var chartLabelPlugin={afterDatasetsDraw:function(a,b){var c=a.ctx;c.fillStyle="rgb(0, 0, 0)";c.font=Chart.helpers.fontString(12,"normal","Helvetica Neue");c.textAlign="center";c.textBaseline="bottom";var l=a.legend.legendItems;a.data.datasets.forEach(function(g,d){var m=a.getDatasetMeta(d),f=a.config.type.toString(),h=0>"polarArea/pie/doughnut".indexOf(f);h&&l[d].hidden||m.data.forEach(function(k,n){if(h||!l[n].hidden){var e=g.data[n];e&&(k=k.tooltipPosition(),0<="polarArea/pie/doughnut/bubble/scatter".indexOf(f)&&
c.fillText(a.data.labels[n],k.x,k.y-14),"bubble"==f?e=e.r:"scatter"==f&&(e=[e.x,e.y]),isNumeric(e)&&(e=Number(e).toLocaleString(void 0,{maximumFractionDigits:20})),c.fillText(e,k.x,k.y-2))}})})}};
const chartLink=function(a,b,c,l,g,d,...m){if(b.length&&b[0]){b=b[0];const f=b.index;let h={};Object.assign(h,g);d&&m&&Array.isArray(m)&&(g=d.split(","),$.each(g,function(k,n){h[n]=m[k][f]}));g=b.datasetIndex;d=a.chart.data;a=d.labels[f];d=d.datasets[g].data[f];b=JSON.stringify(h);b=b.replace("$LBL",a).replace("$VAL",d).replace("$IDX",f).replace("$SEL",g);h=JSON.parse(b);a=(new URLSearchParams(h)).toString();null==c||""==c?window.location.href=l+"?"+a:window.parent.location.href="../"+c+"/"+l+"?"+
a}};
