react-charts icon indicating copy to clipboard operation
react-charts copied to clipboard

Constant secondary axis doesn't show bars

Open Grmiade opened this issue 3 years ago • 1 comments

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.

Grmiade avatar Dec 07 '22 17:12 Grmiade

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).

Meryovi avatar Jul 31 '23 15:07 Meryovi