feat: implement interactive temperature chart dashboard with runway trend visualization and multi-source data collection support

This commit is contained in:
2569718930@qq.com
2026-05-27 01:16:49 +08:00
parent c4119c1aab
commit 2670e2f8ee
13 changed files with 308 additions and 52 deletions
@@ -31,12 +31,14 @@ export function TemperatureTooltipContent({
payload,
data,
series,
tempSymbol = "°C",
}: {
active?: boolean;
label?: string | number;
payload?: ReadonlyArray<{ payload?: Record<string, any> }>;
data: Array<Record<string, any>>;
series: TooltipSeries[];
tempSymbol?: string;
}) {
if (!active || !payload?.length || !series.length) return null;
const activePoint = payload[0]?.payload || {};
@@ -60,7 +62,7 @@ export function TemperatureTooltipContent({
<span className="h-2 w-2 rounded-full" style={{ backgroundColor: item.color }} />
<span className="font-semibold">{item.label}</span>
</span>
<strong className="font-mono text-slate-900">{item.value.toFixed(2)}°</strong>
<strong className="font-mono text-slate-900">{item.value.toFixed(2)}{tempSymbol}</strong>
</div>
))}
</div>