mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
Fix tooltip showing as undefined for first tick
This commit is contained in:
parent
90468c8bf5
commit
d8567ee5c6
@ -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,8 +107,8 @@ export function ThresholdBarGraph({
|
||||
tickPlacement: "on",
|
||||
labels: {
|
||||
rotate: 0,
|
||||
offsetX: -18,
|
||||
formatter: formatTime,
|
||||
offsetX: isMobileOnly ? -18 : 0,
|
||||
},
|
||||
axisBorder: {
|
||||
show: false,
|
||||
@ -302,10 +298,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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user