Drawing Hasse Diagrams to Visualize Posets

171 views
Skip to first unread message

Josh V

unread,
Aug 15, 2014, 5:16:06 PM8/15/14
to d3...@googlegroups.com
Hey there,

Does anyone know of an automatic way to generate a hasse diagram in D3 given a graph representation of a partial order, like so: http://www.nytimes.com/interactive/2012/08/07/sports/olympics/the-best-and-worst-countries-in-the-medal-count.html?

I'm hoping to reproduce something like that without doing too much manual work, and the closest thing I could find to re-purpose is http://bost.ocks.org/mike/hive/, which isn't exactly what I'm looking for. 

Thanks!

Josh

Steven K

unread,
Nov 17, 2015, 5:24:02 PM11/17/15
to d3-js
Hey Josh ... Did you ever find a solution?

Gordon Woodhull

unread,
Nov 18, 2015, 12:45:35 PM11/18/15
to d3...@googlegroups.com
Hi Steven,

The keywords you are looking for are "directed graph layout". 

If the layout is static (won't change in response to user actions), then graphviz [1] is still the best: get it to produce an xml layout, draw it and do your interactions with d3. 

On the other hand, if you do want to add nodes and edges in response to user actions, I can recommend cola.js - it can do many other layouts but you want what they call "flow layout". [2] I don't believe it will do bezier spline routing at this time, though.

I don't have experience with it but d3-dagre is an implementation of graphviz's "dot" directed graph layout in javascript. It does have beziers and might be the easiest pick, but I guess it is no longer maintained. [3]

Cheers,
Gordon 

--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages