Open bwjohns4 opened 2 years ago
Yes, me. Basically this are not duplicated, if you set decimals to 1 or 2 you will see in fact are different values. But if y values are in fact 1,7 and 2.4 both values are rounded at 2.
Interesting. My application only uses whole numbers. Is there a way to set this up so that it does not show y-axis increments of less than a whole number increment?
I'm already using: yAxisInterval={1}
@bwjohns4 I also faced issue. the problem was as there are 5 lines of Y axis,all given data value will fill these lines my initial value is set to zero : fromZero={true} , if max value is less than 4 , the other values will be duplicated to fill 5 lines, so the solution is you need also give max value like this: fromNumber={Math.max(...arrdata) > 4 ? Math.max(...arrdata) : 4 }
if data value is higher than 4 then it draw like this:
@BuniEmris Thank you for above solution. I had similar issue and suggesstions worked like a charm.
@bwjohns4 I also faced issue. the problem was as there are 5 lines of Y axis,all given data value will fill these lines my initial value is set to zero : fromZero={true} , if max value is less than 4 , the other values will be duplicated to fill 5 lines, so the solution is you need also give max value like this: fromNumber={Math.max(...arrdata) > 4 ? Math.max(...arrdata) : 4 } if data value is higher than 4 then it draw like this:
Thanks @BuniEmris It works for me
I am having the same issue for a LineChart. If I allow it to show more decimal places, it shows {1,1.5,2,2.5,3}. Is there a similar solution for a LineChart? LineCharts unfortuantely don' thave "showBarTops" property.
Has anyone encountered this issue where there are duplicate Y axis labels?