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={