Sigma.js: a JavaScript library for graph drawing
sigmajs.org
sigmajs.org
- https://github.com/anvaka/ngraph.pixel
- https://github.com/anvaka/VivaGraphJS
and for large graphs:
- https://github.com/anvaka/pm
with a pretty impressive example, displaying the whole internet (BGP adjacencies):
(And we regularly layout hundreds of thousands of nodes in real-time, so sounds like a great stress test!)
It tells me upfront what it is (so many miss this out!), gives me an example in code, details more features, and then presents a tutorial.
Basically everything I need to know to understand it in a single page. Nice.
Small typo in case the author reads this:
""" Sigma is a JavaScript library dedicated to graph drawing. It makes easy to publish networks on Web pages, and allows developers to integrate network exploration in rich Web applications. """
Should be "It makes it easy to publish" (missing it) or something similar (I'm not a native speaker). Maybe just "It simplifies the publishing of networks on Web pages [...]"
For example, sigma.js is blurry with an hdpi screen. Here is my PR to fix that: https://github.com/jacomyal/sigma.js/pull/639
Thanks for sharing.
https://github.com/jacomyal/sigma.js/tree/master/plugins
It does look like it should be reasonable to add in any custom layouts though.
If you're looking for much more fully-featured graph drawing that's been actively developed for years, have a look at GoJS (http://gojs.net). Canvas diagrams with a focus on interactivity (text editing/undo/etc), layouts, data-binding, and presentation.
Big disclaimer: I'm a lead dev for GoJS and while it packs a huge amount of functionality, it's a commercial JS Library.
For smaller graphs, the focus is generally more on styling, like SVG, so D3 is probably better.
Larger graphs are used in analytic workloads like machine learning, network operations, etc. The emphasis is more on the ability to see big graphs (requiring smart rendering and layout), bind algorithm results to the visual encoding, and drill down. D3 and pure rendering libraries become a bit too low-level and clunky at this point.
Disclamer: talk given by an engineer who has worked on the sigma.js fork https://github.com/Linkurious/linkurious.js
Not to detract from Sigma: it's a great project, and impressive for open source here!
You should still check it out though. It might work for you.
to lay out the graph i was running dot from graphviz on the server. took too long client-side.
I ended up coding a terse JS library (20kb) with a Canvas and SVG renderer and physics simulation that runs on 60fps.