Skip to content

A local-first personal finance app

Hide Y axis values of net worth graph when privacy mode i… (#2594)

Mohamed El Mahdali9aeab0ff5be8
diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx
index f3974f7e4e..825e1ade77 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 0000000000..4ce8d1ca33
--- /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.