Skip to content

Conversation

@theaprilhare
Copy link

Addresses #1947 by adding URL parameters for the chart name and chart mode.

For example, the Balance Sheet with the Assets chart and the Icicle chart mode uses the balance_sheet/?chart_mode=icicle&chart=Assets parameters.

The chart mode is stored in a per-report localStorage (fava-last-active-chart-modes), so that switching to another page and back preserves the chart mode and associated parameters.

The priority order for determining the chart mode is:

  1. URL parameter (chart_mode=...)
  2. The aforementioned localStorage
  3. Global localStorage store as a fallback

@yagebu
Copy link
Member

yagebu commented Jan 22, 2026

Hi, thanks for the PR. Did you use AI tools to create this?

Overall, this feels like too big of an implementation, not keen to merge this as is with the multiple layers of configuration.

@theaprilhare
Copy link
Author

theaprilhare commented Jan 22, 2026

I did for the code to derive the effective mode, yes.

Would it be better to just add chart and chart_mode to synced_search_param_names in frontend/src/stores/url.ts so they work the same way as conversion and interval currently do? The downside is obviously that you can't remember a different chart type per report (e.g., icicle for Balance Sheet and stacked bar for Income Statement), and the chart and chart_mode URL parameters might not make sense for the page you navigate to. conversion and interval work the same way on every page but an icicle chart doesn't make sense for Income Statement->Net Profit, for example.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants