mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +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: {
|
yaxis: {
|
||||||
show: true,
|
show: true,
|
||||||
labels: {
|
labels: {
|
||||||
formatter: (val: number) => Math.ceil(val).toString(),
|
formatter: (val: number) => `${Math.ceil(val)}${unit}`,
|
||||||
},
|
},
|
||||||
min: 0,
|
min: 0,
|
||||||
|
stepSize: unit === "%" ? 5 : undefined,
|
||||||
},
|
},
|
||||||
} as ApexCharts.ApexOptions;
|
} as ApexCharts.ApexOptions;
|
||||||
}, [graphId, threshold, unit, systemTheme, theme, formatTime]);
|
}, [graphId, threshold, unit, systemTheme, theme, formatTime]);
|
||||||
@ -365,9 +366,10 @@ export function CameraLineGraph({
|
|||||||
yaxis: {
|
yaxis: {
|
||||||
show: true,
|
show: true,
|
||||||
labels: {
|
labels: {
|
||||||
formatter: (val: number) => Math.ceil(val).toString(),
|
formatter: (val: number) => `${Math.ceil(val)}${unit}`,
|
||||||
},
|
},
|
||||||
min: 0,
|
min: 0,
|
||||||
|
stepSize: unit === "%" ? 5 : undefined,
|
||||||
},
|
},
|
||||||
} as ApexCharts.ApexOptions;
|
} as ApexCharts.ApexOptions;
|
||||||
}, [graphId, systemTheme, theme, formatTime]);
|
}, [graphId, systemTheme, theme, formatTime]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user