[PR #1739] [MERGED] Sankey with Recharts #3930

Closed
opened 2026-02-28 20:49:00 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/1739
Author: @shaankhosla
Created: 9/26/2023
Status: Merged
Merged: 11/12/2023
Merged by: @shaankhosla

Base: masterHead: sankey_recharts


📝 Commits (10+)

📊 Changes

9 files changed (+531 additions, -4 deletions)

View changed files

📝 packages/desktop-client/src/components/reports/Overview.js (+47 -4)
📝 packages/desktop-client/src/components/reports/ReportRouter.js (+2 -0)
packages/desktop-client/src/components/reports/Sankey.js (+136 -0)
packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx (+145 -0)
packages/desktop-client/src/components/reports/graphs/sankey-spreadsheet.tsx (+191 -0)
📝 packages/desktop-client/src/components/settings/Experimental.tsx (+2 -0)
📝 packages/desktop-client/src/hooks/useFeatureFlag.ts (+1 -0)
📝 packages/loot-core/src/types/prefs.d.ts (+1 -0)
upcoming-release-notes/1739.md (+6 -0)

📄 Description

This PR introduces a new plot, a Sankey diagram of income and expenses, created with a new charting library Recharts.

Recharts is an open-source React chart library with ~21k stars and seemed to be the easiest to use out of the other libraries I looked at. I think this Sankey diagram, and Recharts, would be a great addition to the app. IMO, the Sankey diagram looks great with the very little customization that I did, but I'm excited for others to try it with their own data. This PR is a WIP for 2 reasons:

  1. This is dependent on first proving that Recharts would fit with Actual, and therefore I'll try to create another PR soon that ports over the Networth report to Recharts. This will help us decide if this is the right library to move to.

  2. I'm having some trouble getting the chart to render correctly on the Report Overview page. I'm sure this can be fixed relatively easily but I haven't spent much time on it yet.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/1739 **Author:** [@shaankhosla](https://github.com/shaankhosla) **Created:** 9/26/2023 **Status:** ✅ Merged **Merged:** 11/12/2023 **Merged by:** [@shaankhosla](https://github.com/shaankhosla) **Base:** `master` ← **Head:** `sankey_recharts` --- ### 📝 Commits (10+) - [`a5dd98a`](https://github.com/actualbudget/actual/commit/a5dd98a2314b58efd4a19747d198cd1421fb1b8d) added sankey plot - [`e5bc4ed`](https://github.com/actualbudget/actual/commit/e5bc4eda30bc1ab9f5869ba32126d416ee8dd7e0) fix sankey - [`c9c1903`](https://github.com/actualbudget/actual/commit/c9c19033a715cfbd1bbe970b73494f2f3c23c910) formatting - [`001c523`](https://github.com/actualbudget/actual/commit/001c523ed0276f208902bde8c54197fc1e74109d) formatting - [`7b77832`](https://github.com/actualbudget/actual/commit/7b77832c96f8dbb4aae6b207e0fbd157ae66ba6b) lint - [`7fb1a9c`](https://github.com/actualbudget/actual/commit/7fb1a9c5f7d4601b90e0a726472d4256a45899bb) reduce margin - [`79e29ea`](https://github.com/actualbudget/actual/commit/79e29eaa6f4bccf23b6f000533ce00521140fdb5) experimental flag - [`bd36281`](https://github.com/actualbudget/actual/commit/bd36281e8d2b2ae7c0bff7448f0fd675fadea616) update location of recharts install - [`444612f`](https://github.com/actualbudget/actual/commit/444612f9c2aee9ba8cf159b895713dd6c84cb9dd) truncate tooltip - [`55437b9`](https://github.com/actualbudget/actual/commit/55437b94f7a30b04135b4cbb26f054f345a0fb37) add titles to node and sizing ### 📊 Changes **9 files changed** (+531 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/reports/Overview.js` (+47 -4) 📝 `packages/desktop-client/src/components/reports/ReportRouter.js` (+2 -0) ➕ `packages/desktop-client/src/components/reports/Sankey.js` (+136 -0) ➕ `packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx` (+145 -0) ➕ `packages/desktop-client/src/components/reports/graphs/sankey-spreadsheet.tsx` (+191 -0) 📝 `packages/desktop-client/src/components/settings/Experimental.tsx` (+2 -0) 📝 `packages/desktop-client/src/hooks/useFeatureFlag.ts` (+1 -0) 📝 `packages/loot-core/src/types/prefs.d.ts` (+1 -0) ➕ `upcoming-release-notes/1739.md` (+6 -0) </details> ### 📄 Description This PR introduces a new plot, a Sankey diagram of income and expenses, created with a new charting library Recharts. [Recharts](https://recharts.org/en-US) is an open-source React chart library with ~21k stars and seemed to be the easiest to use out of the other libraries I looked at. I think this Sankey diagram, and Recharts, would be a great addition to the app. IMO, the Sankey diagram looks great with the very little customization that I did, but I'm excited for others to try it with their own data. This PR is a WIP for 2 reasons: 1. This is dependent on first proving that Recharts would fit with Actual, and therefore I'll try to create another PR soon that ports over the Networth report to Recharts. This will help us decide if this is the right library to move to. 2. I'm having some trouble getting the chart to render correctly on the Report Overview page. I'm sure this can be fixed relatively easily but I haven't spent much time on it yet. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:49:00 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#3930