Skip to content

T-B48W-design-language-dataviz-projection

State: open/ready · Impact: medium · Complexity: medium

Charts need theme-aware palettes. The ui package’s ad-hoc dataVizPalette was deleted in Phase 1 (SURVEY drift 8) pending a real projection; pumice still carries its own sibling. Generate a categorical palette and a sequential ramp per theme, accent-anchored and derived from the seeds, and make the chart surfaces consume them.

Partly done. AC-1 through AC-3 shipped in #1558 (merged 2026-08-30): the --d-viz-* tokens exist, useVizPalette() reads them, graph-canvas derives its palette from them, and pumice’s local dataVizPalette is gone. AC-4 remains open — no echarts theme is generated yet, so pumice’s WeeklyHeatmap.vue and polish’s three dashboard charts still map colors by hand instead of consuming a shared theme object.

LocationRole today
packages/ts/ui/app/assets/css/tokens.cssNo data-viz tokens; the accent seeds the derivation would anchor on.
apps/pumice/src-nuxt/app/utils/uiSemantics.tsSurviving local dataVizPalette.
packages/ts/graph-canvas/Own hard-coded node/edge palettes.

Per active theme: an N-step categorical palette and a sequential ramp, exposed as --d-viz-* tokens (or a composable that reads them), derived from the theme’s accent + neutrals so registered themes get palettes for free. pumice’s local palette and graph-canvas’s hard-coded colors consume the projection; echarts theme objects can be generated from the same source.

  1. Design the derivation (hue rotation off the accent, seeded lightness ladder per mode); validate distinguishability in light and dark for all built-in themes.
  2. Implement in the ui layer (tokens or composable); document in design-system.md.
  3. Consume in pumice (replace the local palette) and graph-canvas.
  4. Screenshot pairs of a chart surface per theme.
AreaNote
packages/ts/ui/app/assets/css/tokens.css--d-viz-* derivation
packages/ts/ui/docs/design-system.mdprojection section
apps/pumice/src-nuxt/app/utils/uiSemantics.tsconsume the projection
packages/ts/graph-canvas/palettes from the projection
  • AC-1: Switching theme (and mode) changes chart palettes without app-side code.
  • AC-2: pumice’s local dataVizPalette is gone or a thin re-export.
  • AC-3: Categorical steps remain distinguishable in both modes for every built-in theme (screenshot evidence in the PR).
  • AC-4: A reusable echarts theme is generated from the projection, and the chart surfaces that still map --d-viz-*/status tokens by hand (pumice’s WeeklyHeatmap, polish’s PolishSeverityDonut, PolishHealthGauge, PolishDashboardPane) consume it instead.
  • Per-chart semantic color mapping (status→color stays with dSemantics).
  • The built-in theme-set PR should merge first so derivation is validated against all shipped accents.
  • docs/planning/notes/N-R926-design-language-plan.md Phase 4; SURVEY drift 8.

← Back to Tasks