From 11b6a53c65220703440d83dd9f2df50aee866c71 Mon Sep 17 00:00:00 2001 From: Crazypkr1099 Date: Mon, 18 Sep 2023 18:57:00 -0400 Subject: [PATCH] Completed changes required by Matiss --- .../desktop-client/src/components/reports/NetWorth.js | 7 ++----- .../src/components/reports/graphs/NetWorthGraph.tsx | 8 +++++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/desktop-client/src/components/reports/NetWorth.js b/packages/desktop-client/src/components/reports/NetWorth.js index da3dd9728c3..e03f82d5a65 100644 --- a/packages/desktop-client/src/components/reports/NetWorth.js +++ b/packages/desktop-client/src/components/reports/NetWorth.js @@ -132,11 +132,8 @@ export default function NetWorth() { start={start} end={end} graphData={data.graphData} - domainMinMax={{ - y: [ - data.lowestNetWorth * 0.99, - data.highestNetWorth * 1.01, - ], + domain={{ + y: [data.lowestNetWorth * 0.99, data.highestNetWorth * 1.01], }} /> diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx index 4ac5839d637..8af926c1bc1 100644 --- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx @@ -17,17 +17,19 @@ import Tooltip from '../Tooltip'; import { Area } from './common'; +type domainProp = [number, number]; + type NetWorthGraphProps = { style?: CSSProperties; graphData; compact: boolean; - domainMinMax; + domain: domainProp; }; function NetWorthGraph({ style, graphData, compact, - domainMinMax, + domain, }: NetWorthGraphProps) { const Chart = compact ? VictoryGroup : VictoryChart; @@ -44,7 +46,7 @@ function NetWorthGraph({ scale={{ x: 'time', y: 'linear' }} theme={chartTheme} domainPadding={{ x: 0, y: 10 }} - domain={domainMinMax} + domain={domain} width={width} height={height} containerComponent={