react-apexcharts
react-apexcharts copied to clipboard
X-axis labels don't auto-rotate after crossing a threshold in horizontal bar charts
Description
X-axis labels don't auto-rotate after crossing a threshold in horizontal bar charts. They auto-rotate by 45 degrees as expected for vertical bar charts but don't for horizontal ones.
Library Versions: "react-apexcharts": "1.4.0", "apexcharts": "3.44.0",
Steps to Reproduce
- Create a horizontal bar chart
- Ensure you have large labels on the x-axis
- Ensure "rotateAlways" if passed as a parameter is false (this is the default value if not passed)
Expected Behavior
X-axis labels auto-rotate after they don't fit in the provided space.
Actual Behavior
No rotation occurs. Labels are still displayed normally and are not easy to read.
Screenshots
Reproduction Link
https://codepen.io/kshitijdeshpande/pen/ZEPPjbw
Works fine in vertical bar charts: https://codepen.io/kshitijdeshpande/pen/XWGGBdL