"use client"; import { Bar, BarChart, Cell, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts"; import type { SynopStation } from "@/types/imgw"; import { Card } from "@/components/ui/card"; export function SnapshotChart({ station }: { station: SynopStation }) { const rows = [ { name: "Wilgotność", value: station.humidity, unit: "%", max: 100, color: "#38bdf8" }, { name: "Wiatr", value: station.windSpeed, unit: "m/s", max: 20, color: "#818cf8" }, { name: "Opad", value: station.rainfall, unit: "mm", max: 30, color: "#22d3ee" }, ].filter((row) => row.value !== null).map((row) => ({ ...row, normalized: Math.min(100, ((row.value ?? 0) / row.max) * 100) })); return (

Snapshot pomiarowy

Aktualne proporcje parametrów

Wizualizacja bieżącego odczytu. API synoptyczne IMGW nie udostępnia historii ani prognozy godzinowej.

[`${item.payload.value} ${item.payload.unit}`, item.payload.name]} /> {rows.map((row) => )}
); }