Skip to content

Commit 2b6cb7f

Browse files
committed
Update animationDuration for Treemap
1 parent 13ba62d commit 2b6cb7f

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

components/GroupChart.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import React from "react";
22
import { Treemap, ResponsiveContainer, Tooltip } from "recharts";
3-
import { formatCurrency, formatPercentageOfPortfolio } from "../utils/dataParser";
3+
import {
4+
formatCurrency,
5+
formatPercentageOfPortfolio,
6+
} from "../utils/dataParser";
47

58
interface GroupChartDatum {
69
name: string;
@@ -159,7 +162,8 @@ const GroupChart: React.FC<GroupChartProps> = ({ data, emptyMessage }) => {
159162
<Treemap
160163
data={data}
161164
dataKey="size"
162-
aspectRatio={1}
165+
aspectRatio={4 / 3}
166+
animationDuration={0}
163167
content={createCustomizedContent(data.length)}
164168
>
165169
<Tooltip content={<CustomTooltip />} />

components/PortfolioChart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ const PortfolioChart: React.FC<PortfolioChartProps> = ({ positions }) => {
228228
data={data}
229229
dataKey="size"
230230
aspectRatio={1}
231+
animationDuration={1000}
231232
content={createCustomizedContent(data.length)}
232233
>
233234
<Tooltip content={<CustomTooltip />} />

0 commit comments

Comments
 (0)