修复温度曲线三个渲染问题:数据点过少、张力过高、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:
@@ -47,7 +47,7 @@ export function DetailMiniTemperatureChart({ detail }: { detail: CityDetail }) {
|
||||
label: forecastLabel,
|
||||
pointRadius: 0,
|
||||
spanGaps: true,
|
||||
tension: 0.28,
|
||||
tension: 0.1,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -60,7 +60,7 @@ export function DetailMiniTemperatureChart({ detail }: { detail: CityDetail }) {
|
||||
label: calibratedLabel,
|
||||
pointRadius: 0,
|
||||
spanGaps: true,
|
||||
tension: 0.3,
|
||||
tension: 0.1,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user