diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx index f3974f7e4eccc97a8650b2749097fb7bf9069377..825e1ade772a9d28cb504dbfb671a5e831bb113a 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 0000000000000000000000000000000000000000..4ce8d1ca336f3f7b8f312dc51c6f1fc5d1b249b9 --- /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.