From 5bc9f9a3880ee46a5b9b7c7d5e077e26a3405dcf Mon Sep 17 00:00:00 2001 From: Sean Kelly Date: Mon, 29 Apr 2024 07:52:32 -0700 Subject: [PATCH] [stats] Fix tooltip showing as undefined for first tick (#11150) * Fix tooltip showing as undefined for first tick * Rearrange to simplify diff * Remove offset for mobile --- web/src/components/graph/SystemGraph.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/web/src/components/graph/SystemGraph.tsx b/web/src/components/graph/SystemGraph.tsx index 81db46e7b..834f6e6b4 100644 --- a/web/src/components/graph/SystemGraph.tsx +++ b/web/src/components/graph/SystemGraph.tsx @@ -37,10 +37,6 @@ export function ThresholdBarGraph({ const formatTime = useCallback( (val: unknown) => { - if (val == 1) { - return; - } - const date = new Date(updateTimes[Math.round(val as number) - 1] * 1000); return date.toLocaleTimeString([], { hour12: config?.ui.time_format != "24hour", @@ -111,7 +107,6 @@ export function ThresholdBarGraph({ tickPlacement: "on", labels: { rotate: 0, - offsetX: -18, formatter: formatTime, }, axisBorder: { @@ -302,10 +297,6 @@ export function CameraLineGraph({ const formatTime = useCallback( (val: unknown) => { - if (val == 1) { - return; - } - const date = new Date(updateTimes[Math.round(val as number)] * 1000); return date.toLocaleTimeString([], { hour12: config?.ui.time_format != "24hour", @@ -354,7 +345,6 @@ export function CameraLineGraph({ tickPlacement: "on", labels: { rotate: 0, - offsetX: isMobileOnly ? -18 : 0, formatter: formatTime, }, axisBorder: {