Skip to content

Commit

Permalink
fix(chart): add min y-axis value to prevent decimal tick-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-anderson committed May 8, 2023
1 parent fd67a51 commit 71af378
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ export const ItemsPerMonthChart = ({
axis: "y",
type: "linear",
suggestedMin: 0,
max: yAxisMaximum + 1, // + 1 adds a little extra space at the top
max: Math.max(
yAxisMaximum + 1, // + 1 adds a little extra space at the top
6 // anything less than 6 causes the tick-labels to render as decimals
),
...scalesSharedConfigs,
},
},
Expand Down

0 comments on commit 71af378

Please sign in to comment.