feat: add live temperature threshold chart logic and components for runway monitoring

This commit is contained in:
2569718930@qq.com
2026-05-29 02:10:07 +08:00
parent f2e90fbcda
commit 618bac8b57
3 changed files with 62 additions and 6 deletions
@@ -444,7 +444,17 @@ export function LiveTemperatureThresholdChart({
}, [row, chartHourly, tzOffset, chartLocalDate]);
const runwayPlates = useMemo(() => buildRunwayPlates(chartHourly?.amos, row, settlementObs), [chartHourly?.amos, row, settlementObs]);
const hasRunwayData = runwayPlates.length > 0;
const hasRunwaySeries = useMemo(
() =>
series.some(
(item) =>
item.key.startsWith("runway_") &&
item.key !== "runway_max" &&
item.values.some((value) => validNumber(value) !== null),
),
[series],
);
const hasRunwayData = runwayPlates.length > 0 || hasRunwaySeries;
const settlementPlate = useMemo(() => runwayPlates.find((p) => p.isSettlement), [runwayPlates]);
const chartSeries = useMemo(() => {