Giter Site home page Giter Site logo

Comments (15)

joepagan avatar joepagan commented on June 12, 2024 2

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.

from dtree.

xiroV avatar xiroV commented on June 12, 2024 1

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

from dtree.

anatoliegolovco avatar anatoliegolovco commented on June 12, 2024

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)

from dtree.

ErikGartner avatar ErikGartner commented on June 12, 2024

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.

from dtree.

pthorson avatar pthorson commented on June 12, 2024

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).

from dtree.

ErikGartner avatar ErikGartner commented on June 12, 2024

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

from dtree.

pthorson avatar pthorson commented on June 12, 2024

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

from dtree.

kobbe0 avatar kobbe0 commented on June 12, 2024

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

from dtree.

ucay avatar ucay commented on June 12, 2024

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. 👍

from dtree.

ErikGartner avatar ErikGartner commented on June 12, 2024

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

from dtree.

xiroV avatar xiroV commented on June 12, 2024

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

Brian

from dtree.

ErikGartner avatar ErikGartner commented on June 12, 2024

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

from dtree.

imiten avatar imiten commented on June 12, 2024

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 ?

from dtree.

xiroV avatar xiroV commented on June 12, 2024

@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.

from dtree.

sinky avatar sinky commented on June 12, 2024

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

from dtree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.