Live data from Hacker News

Sigma.js, a JavaScript library dedicated to graph drawing

sigmajs.org

1–10 of 38 posts

Re: Sigma.js, a JavaScript library dedicated to graph drawing

#6
post #4
post #3

What are the strengths of this library, relative to D3? How does Sigma work differently?

For one thing, Sigma appears to have an ortho layout; D3 only does force-directed, right?

Actually, as with d3, you can develop your own network visualization layouts.

The main difference is that sigma only deals with graphs drawing, so it deals without effort with drag and drop (mouse or touch), scaling the graph to the screen, smooth zooming (with mousewheel or pinch)...

Re: Sigma.js, a JavaScript library dedicated to graph drawing

#7
post #6
post #4

Earlier quoted context omitted.

For one thing, Sigma appears to have an ortho layout; D3 only does force-directed, right?

Actually, as with d3, you can develop your own network visualization layouts. The main difference is that sigma only deals with graphs drawing, so it deals without effort with drag and drop (mouse or touch), scaling the graph to the screen, smooth zooming (with mousewheel or pinch)...

Aren't the layouts the Hard part?

Re: Sigma.js, a JavaScript library dedicated to graph drawing

#8
post #3

What are the strengths of this library, relative to D3? How does Sigma work differently?

Sigma is significantly faster than D3 for drawing large graphs; however, it's only able to draw graphs. D3 is a multipurpose library for many different kinds of visualizations.

Re: Sigma.js, a JavaScript library dedicated to graph drawing

#9
post #7
post #6

Earlier quoted context omitted.

Actually, as with d3, you can develop your own network visualization layouts. The main difference is that sigma only deals with graphs drawing, so it deals without effort with drag and drop (mouse or touch), scaling the graph to the screen, smooth zooming (with mousewheel or pinch)...

Aren't the layouts the Hard part?

It is one hard part. But displaying thousands of elements in a web page is another one.

Also, sigma does provide in a plugin a force-directed layout, ForceAtlas2, initially developed for Gephi.

Re: Sigma.js, a JavaScript library dedicated to graph drawing

#10
post #7
post #6

Earlier quoted context omitted.

Actually, as with d3, you can develop your own network visualization layouts. The main difference is that sigma only deals with graphs drawing, so it deals without effort with drag and drop (mouse or touch), scaling the graph to the screen, smooth zooming (with mousewheel or pinch)...

Aren't the layouts the Hard part?

It depends on where your data's coming from, but I tend to avoid doing layout in JS, and instead pre-lay-out the data using Gephi or graphviz (possibly in a cron job if the data changes), loading the hardcoded initial layout in JS and using sigma.js only for display/interaction. In the non-cron case, also lets me tweak the layout a bit through trial and error or trying out different algorithms, to get something I like. Obviously doesn't work for every possible usage, though.
Post reply on HN