## What Clicking a parent category in the cashflow **Money Flow** Sankey now expands its children inline as an extra column branching off the parent — expenses grow to the right, income to the left — instead of swapping the whole chart for a drilled-in view. <img width="782" height="392" alt="image" src="https://github.com/user-attachments/assets/6ce7d925-19d2-4744-a5da-6884a9583a4d" /> ## Behaviour - Toggle: click a parent to expand, click again to collapse. Multiple parents can be open at once. - One level deep (a child with its own children is not further expandable). - The parent stays as an intermediate node and its flow splits into the children + a node for transactions booked directly on the parent (labelled **Parent**). - Changing the period resets expansions. ## Implementation - `sankey-chart.tsx`: dynamic column layout (was fixed 3-column); lazily fetches children via the existing `/api/cashflow/sankey?parent=` endpoint and caches them; label + amount now render in a `foreignObject` so flexbox handles spacing, vertical centering, and CSS-ellipsis truncation (full name kept in a `title`); expand affordance is a `ChevronsRight` icon. - Child nodes use the same `MIN_NODE_HEIGHT` and gap as top-level nodes, centered on the parent so links fan out cleanly. - Removed the old drill-replace + breadcrumb flow (and the now-unused `sankeyParent` hook option). - Backend: the direct-transactions node is renamed from `"<name> (direct)"` to `"Parent"` (+ `es` translation). |
||
|---|---|---|
| .. | ||
| Controllers | ||
| Middleware | ||
| Requests | ||
| Responses | ||