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

Node/parent missing #441

Open ABIRWD opened 1 month ago

ABIRWD commented 1 month ago

Hi bumbeishvili,

first of all, thanks for such an amazing and useful visualization. I have a question I hope you can answer. Our data will be chaning as time goes by and there will be times when a manager leaves and the people bellow that node would be "floating" until a new manager is assigned. The org-chart shows a message for Missing:###### when the parent node is not present. Is there a way to ignore these branches, display them as a new tree, or add it directly to the top level node?

I can always try to do this on the data side, but just wanted to see if there is a way to achieve this on the visualization level.

Thanks, AB

bumbeishvili commented 1 month ago

You can have one root node, which is hidden, and make it parent of these nodes, as well as for general root

https://stackblitz.com/edit/js-qm3aga?file=index.html

ABIRWD commented 1 month ago

Perfect! This example helped me understand more functionality and how to overcome the issue we have. Thanks!