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

@@ -272,7 +272,7 @@ export const getSizeAndUnit = (n: number, isGigabytes = true) => {
} else if (sizeInGB >= 1) {
return { v: sizeInGB, u: " GB" }
}
return { v: n, u: " MB" }
return { v: isGigabytes ? sizeInGB * 1_000 : n, u: " MB" }
}
export const chartMargin = { top: 12 }