BenPortner / js_family_tree

An interactive family tree visualization using d3-dag
GNU General Public License v3.0
70 stars 30 forks source link

Keep unions and their children together #6

Open djBirdman opened 2 years ago

djBirdman commented 2 years ago

Might not be the nicest layout (I'll try and work on improving that), but the ordering is correct. This also handles multiple unions per person, adding a unionyear in the data for ordering. I also decided to compile the data file for the Stark family tree from Game of Thrones (not a fan, but a few other d3 tree examples have used parts of it). I suggest using this bigger tree to see what the d3-dag does by itself

BenPortner commented 2 years ago

Hi @djBirdman,

First off, sorry that it took me so long to get back to you! Unfortunately, js_family_tree is only a side project for me so I don't get to spend as much time on it as I would like. I hope you are still willing to work on this together!

Second off: Thank you so much for pouring so much time into issue #4! I had a look at your code and I can tell that it was a lot of work! I really appreciate your effort.

Now, my comments on the PR:

djBirdman commented 2 years ago

I agree with your thoughts on sorting: I got carried away just trying to make something work without thinking about it properly.

Looking at existing issues in d3-dag, would the ordering discussed in https://github.com/erikbrinkman/d3-dag/issues/93 and available in v0.11.4 of d3-dag be useful in this case? (I haven't nailed down a complete understanding of dag layout concepts!)

BenPortner commented 2 years ago

Hi @djBirdman,

I am not 100% sure but I think d3-dag#93 addresses a different issue (it concerns grid layout instead of sugiyama, I believe the ranking controls the order of the layers, not the order of nodes within the layers). However, I might be wrong. I believe it's best to open a new issue in d3-dag and make a careful inquiry. Describe the desired functionality in detail and link to your solution. Erik will surely be able to tell us if there is existing functionality to achieve the desired behavior. If not, I am sure he will appreciate your contribution 😃