fix: hide probability bands on temperature chart

This commit is contained in:
2569718930@qq.com
2026-06-06 18:00:28 +08:00
parent 89f77b8db4
commit c2f9bc5994
6 changed files with 21 additions and 104 deletions
@@ -1637,7 +1637,7 @@ export function runTests() {
const firstBand = bandPoints[0].runway_band;
assert(Array.isArray(firstBand) && firstBand[0] === 24.0 && firstBand[1] === 26.0, "runway_band tuple values should match input limits");
// ── Legacy Gaussian probability overlay test ──
// ── Legacy Gaussian probability data should not render as a visible chart overlay ──
const gaussianOverlayChart = __buildTemperatureChartDataForTest(
{
city: "toronto",
@@ -1665,14 +1665,7 @@ export function runTests() {
) as any;
const gaussianOverlay = gaussianOverlayChart.probabilityOverlay;
assert(gaussianOverlay, "legacy Gaussian probabilities should be exposed as a chart overlay");
assert(gaussianOverlay.muLine?.value === 27.4, "legacy Gaussian μ should become a reference line");
assert(
gaussianOverlay.bands.some(
(band: any) => band.value === 27 && band.lower === 26.5 && band.upper === 27.5 && band.probability === 0.42,
),
"legacy Gaussian buckets should become horizontal probability temperature bands",
);
assert(gaussianOverlay === null, "legacy Gaussian probabilities should not create visible chart overlays");
assert(
!gaussianOverlayChart.series.some((series: any) => String(series.key || "").includes("probability")),
"legacy Gaussian probability distribution should not be rendered as a time-series line",
@@ -73,11 +73,7 @@ export function runTests() {
);
assert(
probabilityRows.some((row) => row.key === "gaussian_mu" && row.value === "27.4°C"),
"tooltip should expose the Gaussian μ line when the purple probability overlay is present",
);
assert(
probabilityRows.some((row) => row.value.includes("26.5-27.5°C") && row.value.includes("42%")),
"tooltip should expose purple probability-band range and probability values",
probabilityRows.length === 0,
"temperature tooltip should not show Gaussian μ or probability-band rows",
);
}