修复温度曲线三个渲染问题:数据点过少、张力过高、canvas被CSS拉伸

- 小时数据插值为每半小时一点(24→47点)
- 全线 tension 从 0.28-0.32 降至 0.1-0.12
- 移除 canvas CSS width/height !important 声明,交由 Chart.js ResizeObserver 管理
This commit is contained in:
2569718930@qq.com
2026-05-16 21:30:47 +08:00
parent 2e02133696
commit 4a938395be
8 changed files with 27 additions and 23 deletions
@@ -48,7 +48,7 @@ export function DailyTemperatureChart({
label: locale === "en-US" ? "DEB baseline" : "DEB 原始路径",
parsing: false,
pointRadius: 0,
tension: 0.3,
tension: 0.1,
});
if (todayChartData.datasets.calibratedFutureSeries.length > 0) {
@@ -64,7 +64,7 @@ export function DailyTemperatureChart({
parsing: false,
pointHoverRadius: 5,
pointRadius: 0,
tension: 0.32,
tension: 0.12,
});
}
@@ -81,7 +81,7 @@ export function DailyTemperatureChart({
pointHoverRadius: 6,
pointRadius: 0,
spanGaps: true,
tension: 0.3,
tension: 0.1,
});
}
@@ -146,7 +146,7 @@ export function DailyTemperatureChart({
label: locale === "en-US" ? "OM Raw" : "OM 原始",
parsing: false,
pointRadius: 0,
tension: 0.3,
tension: 0.1,
});
}
if ((todayChartData.tafMarkers || []).length > 0) {
@@ -342,7 +342,7 @@ export function DailyTemperatureChart({
label:
locale === "en-US" ? "Open-Meteo Temperature" : "Open-Meteo 温度",
pointRadius: 2,
tension: 0.28,
tension: 0.1,
},
{
backgroundColor: "transparent",
@@ -352,7 +352,7 @@ export function DailyTemperatureChart({
fill: false,
label: locale === "en-US" ? "Dew Point" : "露点",
pointRadius: 0,
tension: 0.24,
tension: 0.1,
},
],
labels,