[PR #2832] [MERGED] fix: number format config not being respected for graphs #34732

Closed
opened 2026-04-20 21:51:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/2832
Author: @sreetamdas
Created: 6/4/2024
Status: Merged
Merged: 7/18/2024
Merged by: @youngcw

Base: masterHead: use-decimal-preference


📝 Commits (10+)

  • f2e031a Add computed padding for handling clipped Net worth amounts
  • 7d3bffc Add comment, early handle 5 character case
  • cbcf7aa Add release note
  • 107471d Use currency decimal preference for Net Worth graph Y-axis ticks
  • 45c5da7 Merge branch 'master' into use-decimal-preference
  • a658294 Merge remote-tracking branch 'origin/master' into use-decimal-preference
  • ff84ba6 Merge branch 'master' into use-decimal-preference
  • 245dcd7 Merge branch 'master' into use-decimal-preference
  • ba52ffb use number format preference for BarLineGraph ticks
  • c94adfd use number format preference for checking NetWorthGraph tick overflow

📊 Changes

4 files changed (+21 additions, -4 deletions)

View changed files

📝 packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx (+3 -1)
📝 packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx (+8 -2)
📝 packages/loot-core/src/shared/util.ts (+4 -1)
upcoming-release-notes/2832.md (+6 -0)

📄 Description

  • Prevent numberFormatConfig overwrite: getNumberFormat uses numberFormatConfig as the default argument; passing just { hideFraction: true } was causing numberFormatConfig.format to be ignored
  • Use amountToCurrencyNoDecimal instead for {BarLine,NetWorth}Graph ticks
  • Use number format preference for BarLineGraph ticks
  • Use number format preference for checking NetWorthGraph tick overflow

🔄 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/2832 **Author:** [@sreetamdas](https://github.com/sreetamdas) **Created:** 6/4/2024 **Status:** ✅ Merged **Merged:** 7/18/2024 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `use-decimal-preference` --- ### 📝 Commits (10+) - [`f2e031a`](https://github.com/actualbudget/actual/commit/f2e031a36ae586d19c3497593b4af775aa0a2567) Add computed padding for handling clipped Net worth amounts - [`7d3bffc`](https://github.com/actualbudget/actual/commit/7d3bffcd748127a3514ccc44492f7661be49bb1c) Add comment, early handle 5 character case - [`cbcf7aa`](https://github.com/actualbudget/actual/commit/cbcf7aac5f8068ae5aea06e2dd3570b2293317a8) Add release note - [`107471d`](https://github.com/actualbudget/actual/commit/107471d8528a918461f76b74bbf83310e25b7d42) Use currency decimal preference for Net Worth graph Y-axis ticks - [`45c5da7`](https://github.com/actualbudget/actual/commit/45c5da7eb07ed471a43607aad535cc25485b0bea) Merge branch 'master' into use-decimal-preference - [`a658294`](https://github.com/actualbudget/actual/commit/a658294290150e402fe7c26242153f9421e6c4f0) Merge remote-tracking branch 'origin/master' into use-decimal-preference - [`ff84ba6`](https://github.com/actualbudget/actual/commit/ff84ba6eb9835d37dc262b095f813d4d26bdce65) Merge branch 'master' into use-decimal-preference - [`245dcd7`](https://github.com/actualbudget/actual/commit/245dcd784214f58e1718ebd4a901a47d31130e39) Merge branch 'master' into use-decimal-preference - [`ba52ffb`](https://github.com/actualbudget/actual/commit/ba52ffbe620eb3c4e1023280c85aba5c725a07fa) use number format preference for `BarLineGraph` ticks - [`c94adfd`](https://github.com/actualbudget/actual/commit/c94adfd6de20053dd412e71f3a98243044e43f83) use number format preference for checking `NetWorthGraph` tick overflow ### 📊 Changes **4 files changed** (+21 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx` (+3 -1) 📝 `packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx` (+8 -2) 📝 `packages/loot-core/src/shared/util.ts` (+4 -1) ➕ `upcoming-release-notes/2832.md` (+6 -0) </details> ### 📄 Description - Prevent `numberFormatConfig` overwrite: `getNumberFormat` uses [`numberFormatConfig`](https://github.com/actualbudget/actual/blob/f75d0f80998322c208fe3d7fe098091e543f4919/packages/loot-core/src/shared/util.ts#L239-L245) as the default argument; passing just [`{ hideFraction: true }`](https://github.com/actualbudget/actual/blob/f75d0f80998322c208fe3d7fe098091e543f4919/packages/loot-core/src/shared/util.ts#L344) was causing `numberFormatConfig.format` to be ignored - Use `amountToCurrencyNoDecimal` instead for `{BarLine,NetWorth}Graph` ticks - Use number format preference for `BarLineGraph` ticks - Use number format preference for checking `NetWorthGraph` tick overflow --- <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-04-20 21:51:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#34732