ErikGartner / dTree

A library for visualizing data trees with multiple parents, such as family trees. Built on top of D3.
https://treehouse.gartner.io/ErikGartner/58e58be650453b6d49d7
MIT License
509 stars 135 forks source link

Declutter graph with optional flag that selects whether node appears at left, or at right #151

Open GreatAlfredini opened 7 months ago

GreatAlfredini commented 7 months ago

My grandmother was widowed, then re-married.

Both of her husbands render to her right.

This makes for a convoluted graph with lines jumping over each other. Like this:

           +------------------------------------+
            |                                                            |
        grandma  ------- husband1          husband2

When you add the children from each marriage, it gets very confusing very fast.

Would suggest a flag that chooses whether to render a node to the left, or to the right.

That is, "Put husband1 to the left of grandma, and put husband2 to the right of grandma".

Like so:

  husband1 ------  grandma  ------- husband2 

This would go a long way towards untangling some/many family trees.

The flag should. be optional so it doesn't break existing json files.

If someone marries three times the problem reappears but the above feature would satisfy most cases