This commit is contained in:
Nicolas Mowen 2024-09-16 16:38:31 -06:00
parent 410cdf92dc
commit 61d652659e

View File

@ -37,6 +37,7 @@ export function ThresholdBarGraph({
return undefined; return undefined;
} }
// @ts-expect-error y is valid
const yValues: number[] = data[0].data.map((point) => point?.y); const yValues: number[] = data[0].data.map((point) => point?.y);
return Math.max(threshold.warning, ...yValues); return Math.max(threshold.warning, ...yValues);
}, [data, threshold, unit]); }, [data, threshold, unit]);