fix display of values under 1 GB in disk usage chart (closes #261)

This commit is contained in:
Henry Dollman
2024-11-06 13:52:35 -05:00
parent 233349fb2a
commit b5ed7cd555
3 changed files with 8 additions and 7 deletions

View File

@@ -27,6 +27,11 @@ export default memo(function DiskChart({
const { yAxisWidth, updateYAxisWidth } = useYAxisWidth()
const { _ } = useLingui()
// round to nearest GB
if (diskSize >= 100) {
diskSize = Math.round(diskSize)
}
if (chartData.systemStats.length === 0) {
return null
}