Is there a way to have evenly sized ticks for recharts axis while keeping my max value?

I solved it using

const tickArray = [0, Math.trunc(MAX/4), Math.trunc(MAX/2), Math.trunc(3*MAX/4), MAX];

and

ticks={tickArray} domain={[0, MAX]}

in my <YAxis> component and removed

tickCount={5}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top