Skip to content

Sankey Panel

Money FlowPreview
HousingFoodTransportSavings

A Sankey flow diagram showing how money moves from income sources through a central pool to expenses, savings, and net savings. The width of each flow is proportional to the amount.

Chart Type

PropertyValue
LibraryApache ECharts via BaseChart
Series typesankey
Orientationhorizontal
Source filesrc/components/panels/SankeyPanel.tsx

What It Shows

A three-column flow:

Income Sources  -->  Available  -->  Expenses
                                -->  Savings
                                -->  Net Saved
  • Left column -- income sources (Salary, Freelance, etc.)
  • Center node -- "Available" pool (total income)
  • Right column -- expense categories (sorted by amount), savings categories, and optionally "Net Saved"

The "Net Saved" node only appears when total income exceeds total expenses plus savings.

Key Features

FeatureDetail
Three-column layoutIncome -> Available -> Outflows
Node coloringPer-category color from the monthly summary
Link coloringSource node color at 50% opacity (hex 80 suffix)
Net Saved nodeSky blue (#38bdf8), appears only when positive
Adjacency emphasisfocus: 'adjacency' on hover
Right-aligned labelsMono font, 11px, secondary text color

Visual Details

PropertyValue
Node width20px
Node gap12px
Node alignmentjustify
Link curveness0.5
Node border0px (borderless)
Layout iterations0 (manual layout via layout: 'none')
"Available" node colorAccent (#00d4aa)
"Net Saved" node colorSky blue (#38bdf8)

Tooltip

Two formats depending on what is hovered:

Edge (flow):

Salary -> Available
$8,500.00

Node:

Available
$8,500.00

Interactivity

  • Hover on node -- highlights the node and all directly connected flows (adjacency focus)
  • Hover on edge -- highlights the specific flow path
  • Trigger -- mousemove for responsive tracking

Data Source

StoreFields
useFinanceStoremonthlySummary (split into INCOME, EXPENSE, and SAVINGS types)
useChartThemeAccent color, text colors, panel background

Income items are filtered by type === 'INCOME' and total > 0. Expense items are filtered by type === 'EXPENSE' and total < 0 (sorted by amount descending). Savings items are filtered by type === 'SAVINGS' and total < 0.

Empty State

Displays "No flow data" centered in the panel when there are no income or expense entries in the monthly summary.