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

Mix Layout Buttom and Top #346

Open fabianhofer8 opened 10 months ago

fabianhofer8 commented 10 months ago

Hello Mr. Bumbeishvili!

First of all, the entire OrgChart project looks amazing and maybe I’ll use it for a certain project, although I have a question concerning it. I have seen that this question has already been asked in a way but anyways. Is it possible to change the layout for a node and all it’s descendents, meaning that every node has “Top” as their layout choice except a few which have “bottom”. I know it is not the purpose and is against the definition of organigram, but this specific use case requires the orga to look like this:

layout

I’ve tried a few hours changing the d3-org-chart.js class, but I’m not sure if I’m on the right track or if it’s even possible. the ‘solution’ would probably be somewhere in this part, I guess.

Screenshot 2024-01-08 135739

I hope this question makes kinda sense.

Have a great day

bumbeishvili commented 10 months ago

You have to tweak layout calculations, which is the most complex part of this project, so It might be better to find an online d3 js based sample already achieving that and modify that example