react-charts
react-charts copied to clipboard
Constant secondary axis doesn't show bars
Here an example: https://codesandbox.io/s/goofy-haslett-00zw0n?file=/src/useDemoConfig.tsx When the secondary axis only have one value to represent, 5 in my example, no bars are shown.
The way I was able to work around this issue was by explicitly setting a min and max value on the secondary axis. If you don't, the library seems to be trying to figure out the min and max values on its own, and by having a single value the bar is so small you can't see it (min = max = your value).