TanStack / react-charts

⚛️ Simple, immersive & interactive charts for React
https://react-charts.tanstack.com
MIT License
2.98k stars 243 forks source link

Constant secondary axis doesn't show bars #332

Open Grmiade opened 1 year ago

Grmiade commented 1 year ago

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.

Meryovi commented 1 year ago

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