fix some style issues
This commit is contained in:
@@ -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%'
|
||||
|
||||
Reference in New Issue
Block a user