I’m currently working with Highcharts library to create a bar chart, and I’m encountering an issue with the xAxis labels overflowing from their container. Despite attempting to adjust the width, the labels continue to exceed the boundaries of the container.
The container’s width is set to 400px, and I need the xAxis labels to fit within this width without overflowing. Could someone please advise on how to properly adjust the width of the xAxis labels in Highcharts to ensure they fit within the container?
(https://i.stack.imgur.com/Kz7bE.png)](https://i.stack.imgur.com/Kz7bE.png)
(https://i.stack.imgur.com/ZWAuP.png)](https://i.stack.imgur.com/ZWAuP.png)
Here’s what I’ve tried so far:
chartOptions.xAxis.labels.style = { color: 'blue', width: '100px !important'};
With this code, the color of the labels successfully changes to blue, but the width adjustment doesn’t seem to have any effect on the UI.
Additionally, I’ve attempted to directly set the width of the xAxis like so:
chartOptions.xAxis.width = '60px';
However, this also doesn’t reflect any changes in the UI.