Skip to content

Commit

Permalink
CategorySpendingGraph: Increase the number of ticks on wider screens
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Löthberg <[email protected]>
  • Loading branch information
kyrias committed Aug 4, 2023
1 parent fd12490 commit dcad2fa
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ function CategorySpendingGraph({
// eslint-disable-next-line rulesdir/typography
tickFormat={x => d.format(x, "MMM ''yy")}
tickValues={graphData.tickValues}
tickCount={Math.max(1, Math.min(5, graphData.tickValues.length))}
tickCount={Math.max(
1,
Math.min(width > 760 ? 12 : 5, graphData.tickValues.length),
)}
offsetY={50}
orientation="bottom"
/>
Expand Down

0 comments on commit dcad2fa

Please sign in to comment.