[email protected]
Posts: 31
Joined: Fri Apr 21, 2023 2:51 pm

How to make a multi axis combination charts render vertically

Hey, I have a chart combined with line, bar, and area charts - https://jsfiddle.net/lizhu68/tw7o1qa9/44/

How can I make it render vertically like this?
2023-05-24_21-03-11.png
2023-05-24_21-03-11.png (39.19 KiB) Viewed 320 times
I am also wondering if there is a way to adjust the categories to show the selected ones, not all of them, like below:
2023-05-24_21-05-19.png
2023-05-24_21-05-19.png (40.48 KiB) Viewed 320 times
Thanks so much
jedrzej.r
Posts: 725
Joined: Tue Jan 24, 2023 11:21 am

Re: How to make a multi axis combination charts render vertically

Hi!

Thanks for reaching out to us with your question!

In order to render this chart vertically, you should change series "Actual: Enterprise Data" type from bar to column. Keep in mind that bar is actually almost the same type as column, being rotated and inverted as a main difference.

As for displaying ticks only on significant data points, you could iterate through all points from desired series and then update tickPositions array based on your condition, for example: y > 0.

Live demo: https://jsfiddle.net/BlackLabel/8c7tLnhr/

API:
https://api.highcharts.com/highcharts/chart.events.load
https://api.highcharts.com/highcharts/x ... kPositions
https://api.highcharts.com/class-refere ... xis#update

Let me know if that was what you were looking for!
Best regards!
Jędrzej Ruta
Highcharts Developer
[email protected]
Posts: 31
Joined: Fri Apr 21, 2023 2:51 pm

Re: How to make a multi axis combination charts render vertically

Cool, thanks so much for getting back to me. So column type will make the chart render vertically, what about I only have line and area types in the chart, is there a way to do it as well?
jedrzej.r
Posts: 725
Joined: Tue Jan 24, 2023 11:21 am

Re: How to make a multi axis combination charts render vertically

Hi!

Basically all types of chart are rendered in a way where xAxis is layed out horizontally and yAxis vertically, therefore you could say that only the 'bar' chart is an exception from this behaviour. Also, there is an option to invert the chart using chart.inverted property.

API: https://api.highcharts.com/highcharts/chart.inverted

Let me know if you have any further questions!
Best regards!
Jędrzej Ruta
Highcharts Developer
[email protected]
Posts: 31
Joined: Fri Apr 21, 2023 2:51 pm

Re: How to make a multi axis combination charts render vertically

Sounds good, that works for me. thank you

Return to “Highcharts Usage”