I'm looking for a library to visualize a network.
I just need to add some nodes(node has text on them), add edges between them, (edges are directed and have text on them).I don't want to set the position of anything by hand.
I'd like API simple as:
var node1 = X.addNode(1, "Hello"),
node2 = X.addNode(2, "World");
X.addEdge(node1, node2, "helloworld");
I've searched for hours, looked after arborjs, sigma.js, d3.js, JavaScript InfoVis Toolkit, none of them satisfied me.
Is there anything else I can try?
We produce mxGraph, but note this is a commercial library, not open source. I'm not sure exactly why the open source libraries you listed failed, but certainly forming the graph, setting the geometry and labels are all fairly trivial function calls.
Check out VivaGraphJS.
Amazon Visualization sample by VivaGraphJS.
Layout configuration sample, uses WebGL as a renderer.
What's the problem with sigma.js? The library's website has a very simple example to draw the nodes and edges:
var sigRoot = document.getElementById('sig');
var sigInst = sigma.init(sigRoot);
sigInst.addNode('hello',{
label: 'Hello',
color: '#ff0000'
}).addNode('world',{
label: 'World !',
color: '#00ff00'
}).addEdge('hello_world','hello','world').draw();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With