Fix the tooltip to correctly show the percentage and lines of code, and round the percentage to a whole number.

This commit is contained in:
Paul Gauthier (aider) 2024-07-29 12:07:28 -03:00
parent 931e158edf
commit a38a362bd5

View file

@ -61,7 +61,7 @@ document.addEventListener('DOMContentLoaded', function () {
tooltip: {
callbacks: {
label: function(context) {
return `${context.raw.label}: ${context.raw.percentage.toFixed(2)}% (${context.raw.y} lines)`;
return `${context.raw.label}: ${Math.round(context.raw.percentage)}% (${context.raw.r} lines)`;
}
}
},