jstevie
Posts: 1
Joined: Tue Nov 05, 2024 5:38 pm

Dealing with many nodes on a level - Organization Chart

Hi,

I am having quite a lot of issues with really big examples on organization chart.
The issue I'm having is that when there is a level with too many nodes, the graph gets automatically squished instead of expanding horizontally to accommodate this. Currently I am using the render function and chart.setSize as a workaround for this issue, but I would prefer an organic solution to this. Is there anything in Highcharts that can natively deal with this issue? Is there any way we can have zooming as well, so that when the graphs grow very large in size we won't need the scrollbars anymore?

Here is an example of the code: https://jsfiddle.net/6ar3jqyo/9/

Thanks
andrzej.b
Site Moderator
Posts: 307
Joined: Mon Jul 15, 2024 12:34 pm

Re: Dealing with many nodes on a level - Organization Chart

Hi,

Welcome to our forum and thanks for contacting us with your question!

It sounds like you're dealing with a complex organization chart, and I understand how that can be challenging. For your first issue with the chart getting squished, you might want to look into using the nodeWidth and nodePadding, height and width options, and you can apply some of them on a given point.

Sample demo with these options at use I've prepared here: https://jsfiddle.net/BlackLabel/txf4vL6p/

Regarding zooming, Highcharts doesn't natively support zooming for organization charts in the same way it does for other chart types, but you can implement a workaround by using the chart.setSize method to adjust the chart size dynamically, as you actually did.
If you think such a feature would be useful for more users, you can request it here: https://github.com/highcharts/highchart ... new/choose You can expect possible updates or workarounds there. However, if you need a customized solution for yourself without waiting for us to resolve the request, please contact us directly.

Please let me know if I can be of any further assistance.

Kind regards,
Andrzej
Highcharts Developer

Return to “Highcharts Usage”