Skip to content

Web: monthly expenses histogram stacked by category #375

Description

@corentin-core

Context

The trends page answers "where did the money go" for one window at a time, through a donut. It cannot answer "is this category growing month after month". A bar per month, split by category, does — and the aggregate is already computed: the monthly summary returns month by category with planned, actual and forecast.

Decided / to settle

Point Choice
Axes Months across, amounts up, one stacked bar per month
Stacking By category, expenses only, income excluded
Data The existing monthly summary, actual column
Window The report window, four months back and twelve forward
Filter Select a subset of categories; the bars restack on the selection
Category folding To settle — reuse the "Other categories" threshold of the donut, or show every category
Forecast months To settle — hide them, or draw them with a distinct fill

Proposed solution

  • Add a route or fragment serving the month by category matrix for the chart.
  • Draw it as an inline SVG, in the style of the existing sparkline and donut, with the same tooltip behaviour.
  • Add a category filter that restacks without a full page load.

Acceptance criteria

  • The trends page shows a stacked bar per month, split by category.
  • Filtering categories restacks the bars and rescales the axis.
  • The chart reads correctly in light and dark theme, and on a phone in portrait.
  • Category colours match those already used by the donut.
  • French translations added and the .mo recompiled.
  • User docs updated.

Related issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:mediumPriorité moyennetheme:webWeb application (FastAPI/Jinja/HTMX)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions