CodingNic

Categories and Summary

Build the Monthly Trend

Categories and Summary 18 min read

Build the Monthly Trend

Group transactions by year and month in computeMonthlyTotals() and use that result in MonthlyTrend.jsx.

Keep the calculation separate from the rendering so the same function can be tested without React.

Test it

Add records in a second month or inspect the seed data after editing a date. The trend should create one bar pair for every represented month.

Checkpoint

The Summary page can compare income and expenses across the ledger’s history.