Line chart in react

if I'm making a line graph in react how can I make it so that the x-axis is consistent regardless of the number of elements in the array. for example if I had an array of 20 elements or an array of 10 elements. I thought about doing it as having 20 tics but if then were 40 elements each tick would go up by 2 elements but when if I don't have an whole number such as 27 each tick ends up being like 1.35 and I don't want decimals
0 Replies
No replies yetBe the first to reply to this messageJoin