JQuery - 从数据动态生成图形树视图
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9653881/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JQuery - dynamically generate a graphic tree-view from data
提问by levtatarov
i want to dynamically generate a tree-view to represent a users connections in an applicaiton but i don't want it to look like a normal tree-view (looks like a File System structure) like this:
我想动态生成一个树视图来表示应用程序中的用户连接,但我不希望它看起来像一个普通的树视图(看起来像一个文件系统结构),如下所示:
but more like a flow-chart like this:
但更像是这样的流程图:
so basically i want to display it more graphically than a tree-view and if possible - being able to zoom in and out.
所以基本上我想比树视图更图形化地显示它,如果可能的话 - 能够放大和缩小。
how can this be achieved? do you know of any (JS or Jquery) tools for that sort of thing?
如何做到这一点?您知道用于此类事情的任何(JS 或 Jquery)工具吗?
thanks
谢谢
EDIT:
编辑:
in order not to get scattered here're are the tools that seem to be exactly what i was llooking for (with the help of m90and Tats_innit)
为了不分散在这里,这些工具似乎正是我正在寻找的(在m90和Tats_innit的帮助下)
(b.t.w - i'm going with thejit
for now)
(顺便说一句 - 我现在就去thejit
)
采纳答案by Tats_innit
Is this what you are looking for - plugin to create tree view:
这是您要找的 - 创建树视图的插件:
[links below]
[以下链接]
http://jquery.bassistance.de/treeview/demo/
http://jquery.bassistance.de/treeview/demo/
http://archive.plugins.jquery.com/project/treeview
http://archive.plugins.jquery.com/project/treeview
http://docs.jquery.com/Plugins/Treeview/treeview
http://docs.jquery.com/Plugins/Treeview/treeview
Ah, for the flowchart feel there are few plugin like a link above but try this:
啊,对于流程图感觉像上面的链接这样的插件很少,但试试这个:
http://code.google.com/p/js-mindmap/
http://code.google.com/p/js-mindmap/
hope this helps, cheers,
希望这有帮助,欢呼,
回答by ebaxt
You can use JsTree. There is also a tree componentplaned for jQuery UI.