Skip to content

Cashflow Panel

A vertically stacked, multi-grid ECharts visualization combining income/expense bars, cumulative savings, and savings rate percentage into a single synchronized view with forecasting.

What It Shows

Three sub-charts sharing a common x-axis (months), stacked vertically:

GridHeightContent
Top (55%)Income/expense bars + net income lineBar chart with income (green) and expenses (red) side by side, plus a net income line overlay
Middle (25%)Cumulative savings areaArea chart showing running total of net savings over time
Bottom (20%)Savings rate % barsBar chart showing (income - expenses) / income * 100 per month

An average income markLine (dashed) runs across the top grid for reference.

Key Features

  • Cross-grid hover sync -- Moving the cursor over any grid highlights the same month across all three via axisPointer.link.

  • Date range selector -- Four preset ranges:

    ButtonPeriods
    6M6 months
    12M12 months
    2Y24 months
    AllFull history
  • Layer toggles -- Five independently toggleable data layers:

    LayerKeyDefault
    IncomeincomeOn
    ExpensesexpensesOn
    NetnetOn
    CumulativecumulativeOn
    RaterateOn

    Toggling a layer off removes its grid and redistributes the remaining grids proportionally.

  • Forecast mode -- Three modes via useSimulation hook:

    ModeEffect
    ActualHistorical data only
    3MThree-month forward projection
    12MTwelve-month forward projection

    Forecast periods render at 50% opacity to visually distinguish them from actuals.

  • WhatIfSimulator integration -- When the What-If Simulator is active, adjusted income/expense values flow into the forecast.

Data Source

Store / HookFields
useFinanceStoremonthlySummary, simulation
useSimulationForecast periods, adjusted values

Chart rendered via BaseChart.tsx (handles ResizeObserver and theme integration).

Interactivity

ActionResult
Hover any gridCross-grid tooltip sync
Click range buttonChanges visible date window
Toggle layerShows/hides that data series and resizes grids
Switch forecast modeExtends chart with projected periods