feat: Show percentage numbers on top of bars without decimals

This commit is contained in:
Paul Gauthier (aider) 2024-08-15 13:59:56 -07:00
parent 9f5d5ffe89
commit 200427e3f1

View file

@ -116,7 +116,7 @@ document.addEventListener('DOMContentLoaded', function () {
ctx.fillStyle = '#000000';
ctx.textAlign = 'center';
ctx.textBaseline = 'bottom';
ctx.fillText(data.toFixed(1) + '%', bar.x, bar.y - 5);
ctx.fillText(Math.round(data) + '%', bar.x, bar.y - 5);
}
});
});