photosjob
Posts: 3
Joined: Fri Feb 23, 2024 9:16 am

How to position the Y-axis title on an inverted chart

Hi,

I'm trying to adjust the positioning of the Y-axis title (positioned it using a Y - value which works great for a normal chart. But when the chart is inverted the Y-axis title will appear inside the chart (behind the bars).

How can I adjust the Y-axis title position only when a chart is inverted?

Any help will be greatly appreciated.

Kind regards,
Job
jakub.s
Site Moderator
Posts: 1318
Joined: Fri Dec 16, 2022 11:45 am

Re: How to position the Y-axis title on an inverted chart

Hi,

Thanks for the question!

I've prepared a simple example showing how to update the chart conditionally based on the "chart.inverted" state.

Here's a link: https://jsfiddle.net/BlackLabel/3Lqyo4th/

API:
- https://api.highcharts.com/highcharts/c ... nts.render
- https://api.highcharts.com/class-refere ... art#update

I think that this should satisfy the requirements you described.

Please take a look and try it out. In case you have any questions about this, I'll be happy to help.

Best regards!
Jakub
Highcharts Developer

Return to “Highcharts Usage”