Issue 641
feat: Money-flow (Sankey) chart: from the tax bill to the bodies to what they fund
Back to our planOpen
enhancementfrontendvisualizationpriority: mediumshared-component
Problem
In plain words: a neighbor wants to follow a dollar from their bill to the City, the schools, the County and Madison College, and on to what each funds. A flow diagram shows that in one picture. On a phone it must still be readable, and the same flow must be in a table.
Summary of the owner's request (2026-11-02, Claude conversation, text): he wants neighbors to see exactly how property tax money is spent and where it comes from.
Today (checked 2026-11-03):
- visx has it.
@visx/sankey4.0.0 (MIT) renders as a server component in the local test. It wrapsd3-sankey0.12.3, last published 2019-09-02 (npm registry): a small, stable layout. - Depends on sub-issues 1 and 2.
Proposed fix
- The visx adapter gets
flow.- Nodes are
rects with their label and amount as text, and links are paths withstroke-chart-Nclasses at reduced opacity, separated by astroke-backgroundgap. - On a phone (compact layout) the diagram runs top to bottom.
- Beyond 12 links, the chart shows the largest 11 and "Other", and the table keeps all of them.
- Nodes are
- The schema refuses a link to an unknown node, a cycle, and a node whose outflow is more than its inflow (± 0.5).
- The table shows from → to → amount, plus each node's total.
- The block shows
linkswhen the kind isflow. The Markdown tag is<Chart kind="flow" nodes={[…]} links={[…]} />. - The text adapter lists the flow as nested text, so the contract passes.
- Add
@visx/sankeyat exact 4.0.0.
Native first, one line per step:
- Native: none (no flow diagram in React, Next or Payload).
- Official plugins: none.
- Open source:
@visx/sankey4.0.0. - Our code: the flow composition in the adapter, the schema rules and the tests.
Acceptance criteria
- Not done: A flow for the December 2024 bill (4 bodies, from #591's table) renders, and its node totals match the table in a unit test.
- Not done: The contract suite passes for
flowon both adapters. axe passes. - Not done: At 320 px it is readable without sideways scrolling, light and dark (screenshots in the PR).
Area
frontend, visualization
Priority
medium
Generated by Claude Code, opens in a new tab