Commit Graph

1 Commits

Author SHA1 Message Date
Pit Friedrich b341b2ed5d fix: pull dashboard widget data from a ChartDataService (#20)
CI / build-and-test (pull_request) Successful in 2m32s
Chart and KPI numbers were literals in DashboardView, duplicated between
the line and bar chart, and only existed at construction time. Add a thin
data layer as the seam for later refresh/filter work:

- ChartSeries / KpiData records, immutable, carrying translation keys
  rather than display text so the data layer stays free of a UI locale.
- ChartDataService interface plus an in-memory implementation returning
  the previous hardcoded numbers, so nothing changes visually.
- DashboardView injects the service, lays out the KPI tiles from its
  list (grid ids come from the data, so saved layouts still match), and
  resolves the keys against the bundle.

Also fixes DashboardChartPlaywrightTest, red on main since the KPI tiles
landed: it patched the first apex-chart, which is now a sparkline with no
xaxis.categories, so the axis-chart patch was a structural change and
legitimately redrew the SVG. It now targets an axis chart.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124BiJikbhbiEsNfJxdWM69
2026-07-28 20:19:17 +02:00