dTree icon indicating copy to clipboard operation
dTree copied to clipboard

Allow for complete lineage of spouse in marriage.

Open ErikGartner opened this issue 9 years ago • 15 comments

As of now the spouse to a node can't have their lineage in the graph.

ErikGartner avatar May 04 '16 20:05 ErikGartner

As an discussion kick off point:

  1. kids are result of two biological entities male and female which may or may not be married.
  2. sometimes kids are adopted and it's more relevant by whom they was growth, marriage. It could be both or single parent adoption.

My proposal is to have two kind of links:

  • biological
  • marriage

if kid is adopted biological link will point to him while he is under family link. (we can use some kind of dash array line)

anatoliegolovco avatar May 05 '16 09:05 anatoliegolovco

This is not an easy matter for two reasons:

  1. I want to keep the library easy to use for the most common use cases, while adding support for more advanced customisation.
  2. Visualising complex family trees is really hard and keeping the tree understandable and pretty is not always trivial.

One way would be to do add two things:

  1. Make all lines customisable using CSS-classes, just like the nodes are already. That way certain lines could be made into dash-arrays by setting the class of the line. If someone wants to signify an adopted child, then make the line in a different color or dashed.
  2. Add option to add auxiliary connections between nodes. Allow any node to connect with any other node or marriage. That way a spouse could have a link to another node somewhere. However making sure this line doesn't overlap with other might be hard and figuring out how to referrer to other nodes in the json format is also a problem.

ErikGartner avatar May 05 '16 09:05 ErikGartner

Here is a sample of a genogram showing an adoption: http://www.genopro.com/genogram/Sample.aspx. the connection to the new family is with a sort of freeform looking dotted line between the person and the other tree.

One other complication to throw into the mix, the adoptive and biological families may not know much about each other or may even be forbidden from being given information about each other (closed adoption).

pthorson avatar Aug 04 '16 15:08 pthorson

Thanks for you input @pthorson!

I've also done some thinking. The way I see it the next step probably is to solve issue #30 (live editing). Because with that feature the user could:

  1. Add lineages to both side to the marriage. This would probably make for a pretty complex (if not messy) JSON format, that would be easier to generate through a graphical interface or an API.
  2. Add custom lines, such as adoption lines. Possibly using a point a click system and giving the line a CSS class, that's probably the easiest way to prevent overlaps.

Both would require changes to the underlying JSON data format so that data files are generated through the graphical interface or through an API with calls such as:

father = node("father")
mother = node("mother")
child = node("child")

marriage = father.marry(mother)
marriage.add_child(child)

/Erik

ErikGartner avatar Aug 04 '16 15:08 ErikGartner

And I would need to have #31 resolved to actually make use of it since our client is currently standardized on IE11.

pthorson avatar Aug 04 '16 15:08 pthorson

Would be great to have lineage of spouse. Any idea when it can be fixed? :)

kobbe0 avatar Jan 12 '17 09:01 kobbe0

Add custom lines, such as adoption lines. Possibly using a point a click system and giving the line a CSS class, that's probably the easiest way to prevent overlaps.

I love this. :+1:

ucay avatar Jan 19 '17 05:01 ucay

I discovered that this feature was missing after checking dTree out for half an hour. It is sad that this feature is missing, as it would provide me with exactly what I need.

However, I also understand that this is a complex problem, especially if you want to avoid that the library becomes too difficult to use.

Personally, I would love to have the possibility to use API calls, as you mention @ErikGartner . It isn't that I don't like JSON, but as you said, there's a chance that the format will become very messy if you would want to implement this feature. Furthermore, if using data from a database which doesn't store data in a JSON-like format, it would also be much easier with an API to generate the tree.

Otherwise (now I'm just throwing it out there), if you want to keep the current format, but implement lineage for spouses, one possibility (the only I can think of), is to implement a way to add parents for a person, the same way as it is possible to add spouses and children.

Another way, which on the other hand would require some alternation of the current format, would be a way to add id's or weights to each person, and making it possible to refer to these at some other point. So basicly I'm talking about merging multiple trees together in this case, opposed to building one single tree from inside-out in the previous case.

Either way, I'm sure it will become messy. So basicly, as a user: I'm voting for the API.

Please note that I didn't read any of your codebase, so I don't know if I'm way off or anything. I just felt like sharing my thoughts, as this is something I've been thinking about alot.

I hope you come up with a great solution.

Best Brian

xiroV avatar Feb 21 '17 23:02 xiroV

Thanks @xiroV for you thoughts.

I agree with your analysis that adding the functionality to the JSON/Javascript object would make the format messy. Guess the least messy way would be to merge multiple trees by id since it doesn't require changing the format that much.

That shouldn't preclude an API though and I think having both would be the best.

/Erik

ErikGartner avatar Feb 22 '17 09:02 ErikGartner

I completely agree. Wish I could contribute, especially with the API, but sadly JS isn't really my strong suit.

Brian

xiroV avatar Feb 22 '17 17:02 xiroV

Thanks for you input @xiroV. Unfortunately I'm very busy right now but I appreciate the feedback. 👍

ErikGartner avatar Feb 22 '17 20:02 ErikGartner

family 1: Raj, Rina parents Seema (girl), Rohan(boy) siblings/children

family 2. Yash, Jhanvi parents Rina (girl), Vaibhav (boy).

family 1 Seema marries to family 2 Vaibhav. how is this to be represented using json ?

I suppose this issue is for similar thing but could not quite understand the meaning of word lineage. Also currently from json I understand there is no link its just nesting that decides the relationship. two top level families there is no way to show relation between them ?

imiten avatar Sep 14 '17 06:09 imiten

@imiten Unfortunately this is exactly what this issue is about. As the issue is still open, I figure no one have fixed it yet. Hence, my guess is that what you're trying to do is not currently possible.

xiroV avatar Dec 14 '17 19:12 xiroV

https://www.myheritage.de/ has a tree like that. Maybe you can find inspiration there.

sinky avatar Apr 08 '18 19:04 sinky

Just going to highlight that this exists: https://live.yworks.com/demos/layout/familytree/index.html

Update: It does seem to deal with marriages, looks perfect, the guys on support are nice but turns out you need £12k for the license which isn't great for personal use, but, you might be able to reverse engineer it to implement some ideas here.

joepagan avatar Feb 04 '20 20:02 joepagan