metrics: fix disk size formatting

This commit is contained in:
Girish Ramakrishnan
2025-07-04 15:24:26 +02:00
parent ac6f80c274
commit ccda1b4523

View File

@@ -190,7 +190,7 @@ function onPeriodChanged() {
stepSize: yscaleUnit === 'GiB' ? 1 : 256,
autoSkip: true, // skip tick labels as needed
autoSkipPadding: 20, // padding between ticks
callback: (value) => `${value} ${yscaleUnit}`,
callback: (value) => `${value.toFixed(2).replace('.00', '')} ${yscaleUnit}`,
maxTicksLimit: 8 // max tick labels to show
},
beginAtZero: true,