mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 18:34:59 -05:00
feat: add date in tooltip
This commit is contained in:
parent
f0584f0dfb
commit
ccd97009c9
@ -142,9 +142,18 @@ export function NewChart({ server }: { server: string }) {
|
|||||||
<ChartTooltipContent
|
<ChartTooltipContent
|
||||||
className="w-[150px]"
|
className="w-[150px]"
|
||||||
nameKey={activeChart}
|
nameKey={activeChart}
|
||||||
hideLabel
|
indicator="line"
|
||||||
|
labelFormatter={(value) => {
|
||||||
|
return new Date(value).toLocaleDateString("en-US", {
|
||||||
|
month: "short",
|
||||||
|
day: "numeric",
|
||||||
|
year: "numeric",
|
||||||
|
});
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
cursor={false}
|
||||||
|
defaultIndex={1}
|
||||||
/>
|
/>
|
||||||
<Line
|
<Line
|
||||||
dataKey={activeChart}
|
dataKey={activeChart}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user