bumbeishvili / org-chart

Highly customizable org chart. Integrations available for Angular, React, Vue
https://stackblitz.com/edit/web-platform-o5t1ha
MIT License
928 stars 330 forks source link

Error: multiple roots #386

Closed walissonwaal closed 7 months ago

walissonwaal commented 7 months ago

It is not possible to have multiple nodes in root

In the hierarchy of the company for which I am implementing the organization chart, there are two people at the highest level, which means that there are two nodes at the root of the organization chart.

It would be quite interesting if the library didn't have this limitation.

bumbeishvili commented 7 months ago

@walissonwaal you can add one dummy node at the root level in the data and hide it during drawing, this way you can simulate multiple roots.

taruntadikonda commented 3 months ago

@bumbeishvili How to hide a node and links. I have a use case where there are multiple root nodes. Can you provide a example.

bumbeishvili commented 3 months ago

@taruntadikonda check the multi roots example in here

https://github.com/bumbeishvili/org-chart?tab=readme-ov-file#features

taruntadikonda commented 3 months ago

@bumbeishvili I am using a angular project. In the linkUpdate and nodeUpdate event emitters this refers to the DOM element of the node or the link. Is there any equivalent thing to get the DOM element in Typescript.