dabeng / OrgChart

It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
MIT License
2.86k stars 768 forks source link

alternate layout if children is too many #701

Closed veenone closed 1 year ago

veenone commented 1 year ago

Hi @dabeng,

I have another query, this time is about layout for children which is too many as shown below : image

the children is spanning across the screen since I have around 30+ people under a manager. Is there a way to make it simpler? so all children can fit in a screen? I'm thinking to have a layout like the following :

image

or some other layout which is more compact, like vertical layout with 2 or 3 column but from the same parent.

Thank you

dabeng commented 1 year ago

Hi @veenone You can make use of options -- isHybrid or verticalLevel to build up hybrid(horizontal + vertical) chart. The following are related demos on codepen.io

dabeng commented 1 year ago

@veenone I have released v 3.8.0. You can use data option "compact" or option "compact" to build up compact node as shown below.

687474703a2f2f646162656e672e6769746875622e696f2f4f726743686172742f696d672f646174612d70726f702d636f6d706163742e706e67

You can also play around this demo -- https://codepen.io/dabeng/pen/GRwjRJy