6

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?

1

6 Answers 6

9

Check out VivaGraphJS.
Amazon Visualization sample by VivaGraphJS.

Layout configuration sample, uses WebGL as a renderer.

Sign up to request clarification or add additional context in comments.

Comments

3

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.

Comments

2

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();

Comments

2

Check this page of sigma.js
http://sigmajs.org/examples/a_plugin_example.html
and you will see how they do a random or a circular layout.

Comments

2

I found this javascript library to be helpful. Check out the network examples page:

visjs

Comments

0

Try out cne-tnetwork. It is javascript visualization library to create and draw network graphs. It is SVG-based and HTML 5 compatible. It is publicly available on github, licensed under the GNU Afferro license. You can find how to use it in the readme of the library. It has a mode to drag the nodes. The links between nodes can be unidirectional, bidirectional or even "buses" that connect several elements. With CSS you can customize all your styles (nodes, links, arrows, buses...).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.