Live data from Hacker News

D3-dag – Layout algorithms for visualizing directed acylic graphs

github.com

1–10 of 44 posts

Re: D3-dag – Layout algorithms for visualizing directed acylic graphs

#3
I recently wanted to render some graphs and found there are a confusing variety of options. In particular https://github.com/dagrejs/dagre/wiki seems to be layout focused and then plugs into a bunch of other systems including d3. It would be nice if one of these tools was able to describe itself in contrast to the others.

Re: D3-dag – Layout algorithms for visualizing directed acylic graphs

#4
post #3

I recently wanted to render some graphs and found there are a confusing variety of options. In particular https://github.com/dagrejs/dagre/wiki seems to be layout focused and then plugs into a bunch of other systems including d3. It would be nice if one of these tools was able to describe itself in contrast to the others.

Some conceptions of "the graph layout problem" are in fact NP complete.

I wonder if some of the variety you're seeing comes from different approaches people take to keeping the problem tractable.

Re: D3-dag – Layout algorithms for visualizing directed acylic graphs

#5
post #3

I recently wanted to render some graphs and found there are a confusing variety of options. In particular https://github.com/dagrejs/dagre/wiki seems to be layout focused and then plugs into a bunch of other systems including d3. It would be nice if one of these tools was able to describe itself in contrast to the others.

[deleted]

Re: D3-dag – Layout algorithms for visualizing directed acylic graphs

#7
post #6

I've always found it incredibly challenging to layout control-flow graphs (used a lot by compilers), so nice that this exists!

I don’t understand that remark. This library is for directed acyclic graphs. Control flow graphs are directed, but generally have cycles.

Re: D3-dag – Layout algorithms for visualizing directed acylic graphs

#9
post #7
post #6

I've always found it incredibly challenging to layout control-flow graphs (used a lot by compilers), so nice that this exists!

I don’t understand that remark. This library is for directed acyclic graphs. Control flow graphs are directed, but generally have cycles.

Yes, there are cycles, but you want to draw them as DAGs because the "backlink" (the thing that loops back up to the entry point of a loop) isn't on the same footing as the rest of edges.

Re: D3-dag – Layout algorithms for visualizing directed acylic graphs

#10
This library doesn't seem like it gets you much further than the original d3-hierarchy. If you are looking to render a graph that contains cycles, I have found that using the force-graph from d3 is a pretty simplistic approach; I recently used it to render a hierarchy that that contains cycles in a "tree-like" format, d3 is a very powerful and we'll constructed library if you take the time to understand what it is capable of
Post reply on HN