Comments (15)
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.
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.
As an discussion kick off point:
- kids are result of two biological entities male and female which may or may not be married.
- 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.
This is not an easy matter for two reasons:
- I want to keep the library easy to use for the most common use cases, while adding support for more advanced customisation.
- 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:
- 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.
- 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.
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.
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:
- 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.
- 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.
And I would need to have #31 resolved to actually make use of it since our client is currently standardized on IE11.
from dtree.
Would be great to have lineage of spouse. Any idea when it can be fixed? :)
from dtree.
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.
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.
I completely agree. Wish I could contribute, especially with the API, but sadly JS isn't really my strong suit.
Brian
from dtree.
Thanks for you input @xiroV. Unfortunately I'm very busy right now but I appreciate the feedback.
from dtree.
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.
@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.
https://www.myheritage.de/ has a tree like that.
Maybe you can find inspiration there.
from dtree.
Related Issues (20)
- Integration with React JS?
- How to add children without a marrige? HOT 1
- How to set horizontal and vertical scroll bars instead of click and drag ? HOT 1
- Update Request HOT 1
- Make the graph responsive
- Appreciation HOT 2
- [REQUEST] dotted line for divorced marriage HOT 3
- Uncaught DOMException: Failed to read the 'value' property from 'SVGLength': Could not resolve relative length.
- How can I decrease height of mariagge 2nd line HOT 3
- Cannot read properties of undefined (reading 'transform') - dTree with React HOT 2
- How to use in angular
- left-right tree?
- Missing types file
- Support hover events HOT 1
- Can we add image ? HOT 2
- Can we Add Image of person in the Node? HOT 2
- Has Anybody use sql to store and retrieve Tree data from database ?
- Reference error _ is not defined. HOT 2
- Complete basic example somewhere? HOT 5
- Add Parent, chilld or reload tree when data change HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dtree.