change twoDecimalString to use customizable digits

This commit is contained in:
Henry Dollman
2024-10-12 16:03:51 -04:00
parent 10d348c052
commit c0a3bbeefc
10 changed files with 29 additions and 28 deletions

View File

@@ -6,7 +6,7 @@ import {
chartTimeData,
cn,
toFixedFloat,
twoDecimalString,
decimalString,
formatShortDate,
chartMargin,
} from '@/lib/utils'
@@ -74,7 +74,7 @@ export default function MemChart({
// @ts-ignore
itemSorter={(a, b) => a.order - b.order}
labelFormatter={(_, data) => formatShortDate(data[0].payload.created)}
contentFormatter={(item) => twoDecimalString(item.value) + ' GB'}
contentFormatter={(item) => decimalString(item.value) + ' GB'}
indicator="line"
/>
}