使用无DOT的d3.js的定向非循环图 [英] Directed acyclic graph using d3.js without DOT

查看:676
本文介绍了使用无DOT的d3.js的定向非循环图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用d3.js绘制有向无环图。在搜索布局时,我遇到了 Dagre ,但是它似乎没有什么用处,因为我不想在任何地方使用基于DOT的代码。如果任何人知道纯JavaScript解决方案为这个或插件/自定义布局为DAG,请让我知道。提前感谢。

I am trying to draw directed acyclic graph using d3.js. While searching for the layout, I came across Dagre but it seems to be of less use as I do not want to use DOT based code anywhere. If anyone knows about pure Javascript solution for this or plugin/custom layout for DAG, please let me know. Thanks in advance.

推荐答案

Dagre作者这里。 Dagre不包括任何graphviz代码 - 它是纯JavaScript。它基于类似的布局技术;

Dagre author here. Dagre doesn't include any of the graphviz code - it is pure JavaScript. It is based on similar layout techniques though; both are based on techniques from the Sugiyama paper.

您可以在这里找到一些dagre的例子:

You can find some examples of dagre here:

< a href =http://cpettitt.github.io/project/dagre-d3/latest/demo/interactive-demo.html> http://cpettitt.github.io/project/dagre-d3/latest/demo /interactive-demo.html
http:// cpettitt.github.io/project/dagre-d3/latest/demo/sentence-tokenization.html
http://cpettitt.github.io/project/dagre-d3/latest/demo/tcp-state-diagram.html

缩小的来源可以在这里找到: http ://cpettitt.github.io/project/dagre-d3/latest/dagre-d3.min.js 。它在约44K时钟。

The minified source can be found here: http://cpettitt.github.io/project/dagre-d3/latest/dagre-d3.min.js. It clocks in at about 44K.

这篇关于使用无DOT的d3.js的定向非循环图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆