mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
Add label to y axis and adjust step size if percentage
This commit is contained in:
parent
8c610bea49
commit
9079224cb3
@ -123,9 +123,10 @@ export function ThresholdBarGraph({
|
||||
yaxis: {
|
||||
show: true,
|
||||
labels: {
|
||||
formatter: (val: number) => Math.ceil(val).toString(),
|
||||
formatter: (val: number) => `${Math.ceil(val)}${unit}`,
|
||||
},
|
||||
min: 0,
|
||||
stepSize: unit === "%" ? 5 : undefined,
|
||||
},
|
||||
} as ApexCharts.ApexOptions;
|
||||
}, [graphId, threshold, unit, systemTheme, theme, formatTime]);
|
||||
@ -365,9 +366,10 @@ export function CameraLineGraph({
|
||||
yaxis: {
|
||||
show: true,
|
||||
labels: {
|
||||
formatter: (val: number) => Math.ceil(val).toString(),
|
||||
formatter: (val: number) => `${Math.ceil(val)}${unit}`,
|
||||
},
|
||||
min: 0,
|
||||
stepSize: unit === "%" ? 5 : undefined,
|
||||
},
|
||||
} as ApexCharts.ApexOptions;
|
||||
}, [graphId, systemTheme, theme, formatTime]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user