fix some style issues

This commit is contained in:
2025-05-31 12:34:16 +02:00
parent fb2837e523
commit 36695c1398
2 changed files with 18 additions and 1 deletions

View File

@@ -157,6 +157,23 @@ document.addEventListener('DOMContentLoaded', function() {
plugins: {
legend: {
display: false
},
tooltip: {
callbacks: {
label: function(context) {
var value = context.raw;
var units = ['B', 'KB', 'MB', 'GB', 'TB'];
var size = value;
var unitIndex = 0;
while (size >= 1024 && unitIndex < units.length - 1) {
size /= 1024;
unitIndex++;
}
return context.label + ': ' + size.toFixed(1) + ' ' + units[unitIndex];
}
}
}
},
cutout: '70%'