ronnie
ronnie

Reputation: 79

how to show only natural numbers on axes in recharts?

I've to build a concentration curve with data set ranging from (0,100) ,including fractional values and have to display only natural numbers on axes. how can it be done?

Upvotes: 1

Views: 2805

Answers (1)

Stephanie Lane
Stephanie Lane

Reputation: 151

Try this prop on both the x and y axes' components:

<XAxis
    allowDecimals={false}
/>

Upvotes: 7

Related Questions