mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
Improve data label distribution
This commit is contained in:
parent
de11e97e59
commit
5b35839cba
@ -3,6 +3,7 @@ import { FrigateConfig } from "@/types/frigateConfig";
|
||||
import { Threshold } from "@/types/graph";
|
||||
import { useCallback, useEffect, useMemo } from "react";
|
||||
import Chart from "react-apexcharts";
|
||||
import { isMobile, isMobileOnly } from "react-device-detect";
|
||||
import { MdCircle } from "react-icons/md";
|
||||
import useSWR from "swr";
|
||||
|
||||
@ -36,7 +37,7 @@ export function ThresholdBarGraph({
|
||||
|
||||
const formatTime = useCallback(
|
||||
(val: unknown) => {
|
||||
if (val == 0) {
|
||||
if (val == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -96,10 +97,10 @@ export function ThresholdBarGraph({
|
||||
size: 0,
|
||||
},
|
||||
xaxis: {
|
||||
tickAmount: 4,
|
||||
tickAmount: isMobileOnly ? 3 : 4,
|
||||
tickPlacement: "on",
|
||||
labels: {
|
||||
offsetX: -30,
|
||||
offsetX: -18,
|
||||
formatter: formatTime,
|
||||
},
|
||||
axisBorder: {
|
||||
@ -280,7 +281,7 @@ export function CameraLineGraph({
|
||||
|
||||
const formatTime = useCallback(
|
||||
(val: unknown) => {
|
||||
if (val == 0) {
|
||||
if (val == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -328,10 +329,10 @@ export function CameraLineGraph({
|
||||
size: 0,
|
||||
},
|
||||
xaxis: {
|
||||
tickAmount: 4,
|
||||
tickPlacement: "between",
|
||||
tickAmount: isMobileOnly ? 3 : 4,
|
||||
tickPlacement: "on",
|
||||
labels: {
|
||||
offsetX: -30,
|
||||
offsetX: isMobileOnly ? -18 : 0,
|
||||
formatter: formatTime,
|
||||
},
|
||||
axisBorder: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user