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

X-axis labels don't auto-rotate after crossing a threshold in horizontal bar charts

Open Kshitijde opened this issue 1 year ago • 1 comments

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

  1. Create a horizontal bar chart
  2. Ensure you have large labels on the x-axis
  3. 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

image

Reproduction Link

https://codepen.io/kshitijdeshpande/pen/ZEPPjbw

Works fine in vertical bar charts: https://codepen.io/kshitijdeshpande/pen/XWGGBdL

Kshitijde avatar Feb 19 '24 10:02 Kshitijde