mirror of
https://github.com/henrygd/beszel.git
synced 2026-04-15 17:31:50 +02:00
change twoDecimalString to use customizable digits
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
cn,
|
||||
formatShortDate,
|
||||
toFixedWithoutTrailingZeros,
|
||||
twoDecimalString,
|
||||
decimalString,
|
||||
chartMargin,
|
||||
} from '@/lib/utils'
|
||||
import { useStore } from '@nanostores/react'
|
||||
@@ -97,7 +97,7 @@ export default function TemperatureChart({
|
||||
content={
|
||||
<ChartTooltipContent
|
||||
labelFormatter={(_, data) => formatShortDate(data[0].payload.created)}
|
||||
contentFormatter={(item) => twoDecimalString(item.value) + ' °C'}
|
||||
contentFormatter={(item) => decimalString(item.value) + ' °C'}
|
||||
indicator="line"
|
||||
/>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user