feat: add date in tooltip

This commit is contained in:
dvelo 2024-08-18 12:11:12 -05:00
parent f0584f0dfb
commit ccd97009c9

@ -142,9 +142,18 @@ export function NewChart({ server }: { server: string }) {
<ChartTooltipContent
className="w-[150px]"
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
dataKey={activeChart}