问题
Is there an existing PHP, Javascript, or even command line tool that can build a family tree in HTML (preferably) or at the very least create an image for it? Multiple parents are a requirement. I have been googling this for hours, but to no avail.
For instance, the Google Organizational Chart would be ideal, but it only allows each node to have at most one parent. I need two parents to be possible.
Whatever this website does would also be perfect: http://www.familyecho.com/, but it seems to not be done with javascript and they don't publish the code that actually creates the visualization.
Even connecting to an external website to use their API to generate a visualization would be perfect.
回答1:
As it's just the JavaScript you're after (I assume, since you're designing your own schema...) the InfoVis framework provides all sorts of complicated relationships - http://thejit.org/static/v20/Jit/Examples/ForceDirected/example1.html.
回答2:
You might be interested in Raphaël, especially this demo.
Edit: I just came across a couple other promising-looking options from this question.
- Protovis - I knew about this one when I first answered, but didn't think of it at the time. It's really flexible. Check out the examples.
- Dracula Graph - haven't tried it. It might be too simple for your uses.
回答3:
This is possible with Graphviz. It's an (easy to learn) language, and a command-line executable (for Linux, Solaris, Windows and Mac) which can export at least to PNG and SVG. It is extremely flexible and can do family trees. I suppose multiple parents is not a problem at all. Check http://www.graphviz.org/content/kennedyanc for an example. See all the other examples at: http://www.graphviz.org/Gallery.php
You will probably discover several other uses for Graphviz yourself.
回答4:
Family Echo now has an API, allowing you to submit a family tree in GEDCOM or FamilyScript format, and view in online via the Family Echo site.
回答5:
If one is willing to use CSS - http://thecodeplayer.com/experiment/css3-family-tree/2
回答6:
At last if found very useful script for making professional family tree diagram in php. It helped me alot. Just want to share with others, may be helpful to others.
jTree Family Tree Maker Script
来源:https://stackoverflow.com/questions/5639142/javascript-php-family-tree-builder-with-multiple-parents