feat: implement temperature chart visibility logic with comprehensive unit testing and analysis service support

This commit is contained in:
2569718930@qq.com
2026-05-29 22:40:33 +08:00
parent 95c2258db0
commit 68416b058e
6 changed files with 385 additions and 22 deletions
@@ -86,9 +86,23 @@ function isTemperatureSeriesVisibleByDefault(city: string, seriesKey: string) {
if (seriesKey.startsWith("model_curve_")) {
return normalizeCityKey(city) === "paris" && seriesKey === "model_curve_AROME HD";
}
if (seriesKey === "metar" || seriesKey === "madis") {
if (seriesKey === "metar") {
const cityKey = normalizeCityKey(city);
return cityKey === "hongkong" || cityKey === "laufaushan" || cityKey === "shenzhen";
return (
cityKey !== "hongkong" &&
cityKey !== "laufaushan" &&
cityKey !== "shenzhen"
);
}
if (seriesKey === "madis") {
const cityKey = normalizeCityKey(city);
return (
cityKey === "hongkong" ||
cityKey === "laufaushan" ||
cityKey === "shenzhen" ||
cityKey === "ankara" ||
cityKey === "istanbul"
);
}
return true;
}