From 9aeab0ff5be841cbf52b63bf69876958438e2b88 Mon Sep 17 00:00:00 2001
From: Mohamed El Mahdali <ttlgeek@gmail.com>
Date: Sat, 13 Apr 2024 11:50:35 +0000
Subject: [PATCH] =?UTF-8?q?Hide=20Y=20axis=20values=20of=20net=20worth=20g?=
 =?UTF-8?q?raph=20when=20privacy=20mode=20i=E2=80=A6=20(#2594)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/components/reports/graphs/NetWorthGraph.tsx         | 5 ++++-
 upcoming-release-notes/2594.md                              | 6 ++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 upcoming-release-notes/2594.md

diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx
index f3974f7e4..825e1ade7 100644
--- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx
@@ -12,6 +12,7 @@ import {
   ResponsiveContainer,
 } from 'recharts';
 
+import { usePrivacyMode } from '../../../hooks/usePrivacyMode';
 import { theme } from '../../../style';
 import { type CSSProperties } from '../../../style';
 import { AlignedText } from '../../common/AlignedText';
@@ -29,8 +30,10 @@ export function NetWorthGraph({
   graphData,
   compact,
 }: NetWorthGraphProps) {
+  const privacyMode = usePrivacyMode();
+
   const tickFormatter = tick => {
-    return `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas
+    return privacyMode ? '...' : `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas
   };
 
   const gradientOffset = () => {
diff --git a/upcoming-release-notes/2594.md b/upcoming-release-notes/2594.md
new file mode 100644
index 000000000..4ce8d1ca3
--- /dev/null
+++ b/upcoming-release-notes/2594.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [ttlgeek]
+---
+
+Hide Y axis values of net worth graph when privacy mode is enabled.
-- 
GitLab