Let chart views avoid the dashboard utility bulk

The intraday chart data builder lived inside dashboard-utils with observation-source and TAF helpers, so chart consumers had to depend on the large dashboard utility surface. This moves chart data preparation, observation-source helpers, and TAF marker labels into focused modules while keeping dashboard-utils re-export compatibility.

Constraint: Preserve existing chart data shape, observation labels, TAF labels, and legacy dashboard-utils exports.

Rejected: Rewrite chart data generation while moving it | this pass is a boundary move only so visual behavior remains stable.

Confidence: high

Scope-risk: moderate

Reversibility: clean

Tested: TypeScript diagnostics for chart-utils, dashboard-utils, observation-source-utils, and taf-utils

Tested: npm run build

Not-tested: Browser visual regression across every chart city.
This commit is contained in:
2569718930@qq.com
2026-04-28 11:58:58 +08:00
parent c476ad2123
commit ecbba9160d
8 changed files with 889 additions and 858 deletions
@@ -23,11 +23,11 @@ import {
ModelForecast,
ProbabilityDistribution,
} from "@/components/dashboard/PanelSections";
import { getTemperatureChartData } from "@/lib/chart-utils";
import {
getFutureModalView,
getModelView,
getProbabilityView,
getTemperatureChartData,
getWeatherSummary,
} from "@/lib/dashboard-utils";
import { getTodayPaceView } from "@/lib/pace-utils";