Number of visible tree levels question

When I set the Number of visible tree levels to, for example, 2 where there are actually 5/6 the chart will open just showing 2 and then will start opening all of the lower levels one by one. Is this the expected behaviour? and if so, how can I limit how many levels are shown?

Also, is it possible to have all levels collapsed on load? I can’t see any way of doing this. If there is code snippet I can use please provide this as it would be incredibly useful :slight_smile:

Hi Sian,

Thank you for your questions.

You can specify number of visible levels in the configuration wizard at “General settings” step.

If you specify 1, then only root item will be show.

Regarding your question:

If you specify 2 in the general settings, Org Chart has to show first and second levels. Then you will be able to manually expand nodes. Do you have different behavior?

Thanks for your speedy response Anton.

I just tried adding the chart to a new page with the levels set to 2 and this works as you described.

My original page still doesn’t work correctly when I change this from 10 levels to 2. If I set it to 2 levels, it opens with just 2 levels and then starts opening every level below without me doing anything. At least I know I can remove and re-add the web part to resolve the issue.

Please, ensure that you have only one Org Chart per page.