Skip to content

Commit

Permalink
Feedback: reduced animation duration to 1s
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis committed Jan 21, 2024
1 parent 3b770f2 commit 02bdd09
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import {

import { theme } from '../../../style';
import { AlignedText } from '../../common/AlignedText';
import { PrivacyFilter } from '../../PrivacyFilter';
import { chartTheme } from '../chart-theme';

const MAX_BAR_SIZE = 50;
const ANIMATION_DURATION = 1000; // in ms

type CustomTooltipProps = TooltipProps<number, 'date'> & {
isConcise: boolean;
Expand Down Expand Up @@ -141,19 +141,22 @@ export function CashFlowGraph({ graphData, isConcise }: CashFlowGraphProps) {
stackId="a"
fill={chartTheme.colors.blue}
maxBarSize={MAX_BAR_SIZE}
animationDuration={ANIMATION_DURATION}
/>
<Bar
dataKey="expenses"
stackId="a"
fill={chartTheme.colors.red}
maxBarSize={MAX_BAR_SIZE}
animationDuration={ANIMATION_DURATION}
/>
<Line
type="monotone"
dataKey="balance"
dot={false}
stroke={theme.pageTextLight}
strokeWidth={2}
animationDuration={ANIMATION_DURATION}
/>
</ComposedChart>
</ResponsiveContainer>
Expand Down

0 comments on commit 02bdd09

Please sign in to comment.