Skip to content

Commit

Permalink
Feedback: set max bar size to 50px
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis committed Jan 20, 2024
1 parent 0460b9c commit 9f73512
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { AlignedText } from '../../common/AlignedText';
import { PrivacyFilter } from '../../PrivacyFilter';
import { chartTheme } from '../chart-theme';

const MAX_BAR_SIZE = 50;

type CustomTooltipProps = TooltipProps<number, 'date'> & {
isConcise: boolean;
};
Expand Down Expand Up @@ -141,8 +143,18 @@ export function CashFlowGraph({ graphData, isConcise }: CashFlowGraphProps) {
/>

<ReferenceLine y={0} stroke="#000" />
<Bar dataKey="income" stackId="a" fill={chartTheme.colors.blue} />
<Bar dataKey="expenses" stackId="a" fill={chartTheme.colors.red} />
<Bar
dataKey="income"
stackId="a"
fill={chartTheme.colors.blue}
maxBarSize={MAX_BAR_SIZE}
/>
<Bar
dataKey="expenses"
stackId="a"
fill={chartTheme.colors.red}
maxBarSize={MAX_BAR_SIZE}
/>
<Line
type="monotone"
dataKey="balance"
Expand Down

0 comments on commit 9f73512

Please sign in to comment.