有人知道使用 AJAX 的 Family Tree 吗?
有谁知道任何可以像 http://www.genoom.com 家谱一样工作的脚本吗?
或者你们能给我一些关于他们用来制作这样的树的数据库表结构的想法吗?
他们如何显示家庭成员框和线?
请尽快告诉我。
[编辑]
我尝试过这样的表结构:
-----------------------------------------------
TREE
-----------------------------------------------
ID | PARENTID | PARENT_RELATION | NAME
-----------------------------------------------
1 | 0 | | My Father
2 | 1 | Father | It is me
*tree(id int autoincrement,parentid int,parent_relation varchar,name varchar)*
在第一个记录中,它显示树将以“我的父亲”开头并且然后遍历就会显示‘是我’。我在 PHP 中使用递归函数尝试了整个过程。但是当我尝试显示节点之间的连接线时,我卡住了。
Does any one know about any script that will work like http://www.genoom.com family tree?
Or can you guys give me any ideas about the database table structure they used to make the tree like this?
And how are they displaying family member boxes and lines?
Please let me know ASAP.
[EDITED]
I have tried table structure like this:
-----------------------------------------------
TREE
-----------------------------------------------
ID | PARENTID | PARENT_RELATION | NAME
-----------------------------------------------
1 | 0 | | My Father
2 | 1 | Father | It is me
*tree(id int auto increment, parentid int, parent_relation varchar, name varchar)*
In first record it shows tree will starts with 'My Father' and then traverse and will display 'It is me'. And whole thing I tried in PHP by using a recursive function. But I stuck when I am trying to display connecting lines between nodes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你最好将你的问题改成“是否有一个用于生成谱系图和数据映射的javascript框架”,我自己也在寻找,但还没有发现任何好的东西,除非你使用像raphael这样的通用图形框架,但然后你' r 自己进行建模和数据映射等。
编辑:我发现这个小提琴看起来非常有前途,它展示了一种使用简单模型连接两个节点的方法。 http://jsfiddle.net/mking/2UJcZ/4/
我也发现了这个类似的解决方案使用 Go.js
http://gojs.net/latest/intro/usingModels.html
you'd best reform your question to "is there a javascript framework for generating genealogy diagrams and datamapping", i'm on the lookout myself but didn't find anything good yet unless you use a general graphing framework like raphael but then you'r on your own with the modelling and datamapping etc.
EDIT: i have found this fiddle that looks very promising, it shows a way to connect two nodes with a simple model. http://jsfiddle.net/mking/2UJcZ/4/
I found also this similar solution using Go.js
http://gojs.net/latest/intro/usingModels.html
我不知道有任何使用 Ajax 的开源或付费脚本。 一些使用 JavaScript 可能会给您一些想法。
我所知道的一个免费且非常全面的框架是 Family.Show,它可能会给你一些帮助关于如何设置一切的好主意。但是,它使用 Windows Presentation Foundation 和 Silverlight。 Family.Show 框架中已经出现了几种不同的家谱程序。
I don't know of any open-source or paid scripts that use Ajax. There are a few that use JavaScript that might give you some ideas.
The one framework I know of that is freely available and is quite comprehensive is Family.Show, which might give you some good ideas as to how to set everything up. However, it uses Windows Presentation Foundation and Silverlight. Several different genealogy programs have sprouted from the Family.Show framework.