Live data from Hacker News

Springy: A force-directed graph layout algorithm in JavaScript

getspringy.com

1–10 of 15 posts

Re: Springy: A force-directed graph layout algorithm in JavaScript

#7
post #6

How is it different from D3's force layout + DOM manipulation? Looks very, very similar to me.

It's an inferior subset of D3, however HN will upvote anything with JS in the title.

Like I just upvoted your comment? Because it had JS in the body... Just kidding, I agree completely with you. It's currently very "in vogue" to promote anything remotely related to JS or Node. I always say, right tool for the job, and if that happens to be JS/Node, great. However, sometimes it feels like these JS pushers have JS as their proverbial hammer, and every single problem they encounter is a nail to be hammered (with JS).

Re: Springy: A force-directed graph layout algorithm in JavaScript

#8

How is it different from D3's force layout + DOM manipulation? Looks very, very similar to me.

Indeed. See http://bl.ocks.org/mbostock/4062045 for Mike Bostock's example of a simple force-directed graph including the D3.js code.

(BTW, see http://bl.ocks.org/mbostock for an impressive collection of visualizations made with D3.js. Impressive both in terms of size of the collection, quality of the code and clarity of the visualizations.)

Re: Springy: A force-directed graph layout algorithm in JavaScript

#9

How is it different from D3's force layout + DOM manipulation? Looks very, very similar to me.

Well, it (slightly) predates D3, for what it's worth:

https://github.com/dhotson/springy/commits/master?page=4 https://github.com/mbostock/d3/commits/master?page=91

If all you need is spring layout without the rest of D3, Springy might be a better fit.

Post reply on HN