BALKANGraph / OrgChartJS

OrgChart JS is a simple, flexible and highly customizable organization chart plugin for presenting the structure of your organization and the relationships in an elegant way.
https://balkan.app/orgchartjs
252 stars 84 forks source link

Subtrees connected by child partners #511

Closed Alexi5 closed 3 years ago

Alexi5 commented 3 years ago

Hello,

Is there a way to connect children of two different subtrees?

ZornitsaPesheva commented 3 years ago

Hi Alexis!

Do you mean this?: https://jsfiddle.net/9d1nx8k0/1/

Alexi5 commented 3 years ago

Hi! Yes, I'm looking for something like that.

Can the curved line be customized? And is it possible to add a child node that belongs to both subtrees (ex one parent from each of those subtrees)?

Thanks!

ZornitsaPesheva commented 3 years ago

The C link can be customized. It is not possible to add child of both subrees as parents. If you you trying to create family tree you could look at this approach: https://balkangraph.com/OrgChartJS-Demos/FamilyTree

Alexi5 commented 3 years ago

Ok great!

Since there's no way to add children of different subtrees, I'm going to use the expand/collapse functionality to show different trees. Do you know if there is an example of that?

ZornitsaPesheva commented 3 years ago

Could you show us with a screenshot what exactly do you mean?

Alexi5 commented 3 years ago

Sure thing

If I have a tree that looks like this. Then when I click "Harvey Bishop" it will expand to a different tree

Screen Shot 2021-02-08 at 9 22 56 AM

This will be the new tree that is expanded. Its hidden until we click on a descendent of that tree

Screen Shot 2021-02-08 at 9 26 16 AM
ZornitsaPesheva commented 3 years ago

Here is how you can add a button for loading the second chart: https://jsfiddle.net/BALKANGraph/oj4hdbL8/

Alexi5 commented 3 years ago

Great, thank you!