Skip to content
SprecherEast
Issue 866

feat: Breakdown chart with a size-ordered orange and gray ramp

Back to our plan
Done
enhancementfrontendvisualizationpriority: medium

Problem

In plain words: a neighbor should see at a glance where public money goes: which areas are biggest, by how much, and what is inside each. Today a chart can show one square grid or one set of bars, with colors that do not follow size, and it cannot show the pieces inside an area.

  • The orange and gray palette alternates dark and light, so the order of size is hard to read.
  • A grid of squares splits one hundred, so a square stands for a different amount in every chart and cannot be compared across charts.
  • There are no percentages beside the bars and no way to open the smaller pieces inside an area.

Summary of the owner's request (2026-11-07, Claude conversation, text): approved a preview in which one chart shows a grid where each square is a fixed amount with a legend explaining it, ranked bars with dollars and percent, the pieces inside an area nested under it in the area's own color, and a control that opens the smaller pieces; colors run from dark orange for the largest through brighter orange to orange mixed with gray and ending in a plain warm gray, never white.

Proposed fix

  1. Palette: the orange and gray theme tokens become one ordered ramp, darkest first, ending in warm gray, in light and dark, passing contrast. Done first, on its own, so existing charts improve at once.
  2. A new chart kind "breakdown": a grid of squares each worth one fixed amount, with a legend line that says so, plus ranked bars with amount and percent, areas sorted by size, optional pieces inside each area (nested with a connector, in the area's color), and an expandable "smaller pieces" list. Server-rendered with native details, motion off for reduced-motion visitors.
  3. The same rules everywhere a chart is stored: the validated spec, the editor block and its mapper, the agents' Markdown tag, the numbers table, the gallery and the docs.
  4. In the CMS, after deploy: replace the two plain grids on the budget post with the new chart.

Acceptance criteria

  • Not done: The ramp is ordered by size in both themes and every mark passes non-text contrast against its card.
  • Not done: A breakdown chart is refused with the reasons when its rules fail (parts, totals, nesting, amount per square); one chart fits in a fact tab panel.
  • Not done: Squares are whole, add up to the rounded total, and the legend states the amount each stands for.
  • Not done: Nested pieces never exceed their area; the numbers table lists every piece.
  • Not done: Works at 320 to 1280 px in light and dark with nothing overflowing; no raw tags, no color literals, tests first, axe clean.
  • Not done: Gallery entry, component-set row and the knowledge notes updated in the same PRs.

Files likely touched

src/platform/lib/chart/spec.ts, src/platform/ui/chart/, src/platform/richtext/editorial/chart, src/themes/default/theme.css, docs/ui/component-set.md

Open questions

None for the owner; the design was approved in the preview. A second chart in a fact tab stays out of scope.


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab