fperucic / treant-js

Treant.js - javascript library for drawing tree diagrams
MIT License
862 stars 314 forks source link

can a node have two parent #96

Closed siddht5 closed 6 years ago

siddht5 commented 6 years ago

I am trying to create a chart where two or more parents node are required to effictively show the entire chart.

Example : family tree,class heirachy in oops,etc. Some graphical examples to what I am trying to obtain

https://thumb1.shutterstock.com/display_pic_with_logo/861670/304430183/stock-vector-genealogical-tree-of-your-family-family-tree-with-icons-of-people-vector-illustration-vintage-304430183.jpg

https://dota2.gamepedia.com/Perseverance

None of the examples shows anything to generate this.

So i tried to convert node parent to array but it doesnt seem to work

child_1 = { parent: [parent_1,parent_2

but it doesnt work.

So kindly add this feature or provide it in an example

dlgoodchild commented 6 years ago

This feature does not exist and I don't believe it will exist any time soon; at least I have no intentions of implementing it, but if you wish to make a pull request I'll definitely review it and include it if it all checks out.

siddht5 commented 6 years ago

ok I was trying to do that by tinkering with the code but it failed.

Anyways as go.js does it and your code can be extended to add parents node. So once I figure everything it out,i will soon make a pr.

Example of go.js way to do it https://gojs.net/latest/samples/familyTree.html