Restore detail chart 23:30 slot

This commit is contained in:
2569718930@qq.com
2026-06-15 02:45:20 +08:00
parent 4210f5f753
commit 39977e4431
2 changed files with 50 additions and 11 deletions
+8 -10
View File
@@ -178,16 +178,14 @@ export function buildChartTimeAxis(
const hh = String(h).padStart(2, "0");
times.push(`${hh}:00`);
temps.push(getHourTemp(h));
if (h < 23) {
const a = getHourTemp(h);
const b = getHourTemp(h + 1);
times.push(`${hh}:30`);
temps.push(
a != null && b != null
? Number((a + (b - a) * 0.5).toFixed(1))
: a ?? b,
);
}
const a = getHourTemp(h);
const b = getHourTemp(h + 1);
times.push(`${hh}:30`);
temps.push(
a != null && b != null
? Number((a + (b - a) * 0.5).toFixed(1))
: a ?? b,
);
}
return { times, temps };