Layout
You can use different layouts in OrgChart JS.Node Levels
You could set the node level, using the tags property subLevels. The value of the subLevels sets how many levels to go down the particular node.
More about tags you can read on our Tags documentation page.
OrgChart.normal (the default layout)
Mixed Hierarchy
If you want to use verical and horizontal layout in order to optimize the space set layout to OrgChart.mixed, OrgChart.tree, OrgChart.treeLeftOffset and OrgChart.treeRightOffset
OrgChart.mixed
OrgChart.mixed with MIXED_LAYOUT_ALL_NODES = false
OrgChart.tree
OrgChart.treeLeft
OrgChart.treeLeftOffset
OrgChart.treeRight
OrgChart.treeRightOffset
Mixed Layout for nodes with collapsed children
You can say after what number of children to change the layout
Sublevels with layouts
Grid layout
node-layout event
You can have different layouts in the different branches (changing args.layout):
You can have different layouts for every node (changing args.layouts):
Here we have an example that is changing args.layout and args.layouts on "layout" event to create more custom layout.
Toolbar
You can use the Toolbar buttons to open the Layouts options:
Here is a code demo of how to add a custom (collapse all) button in the toolbar.