Example code in readme not working -- addNode() #71

Closed
Bouncner opened this Issue Feb 5, 2013 · 2 comments

Comments

Projects
None yet
2 participants

Bouncner commented Feb 5, 2013

Hi,

just wanted to say that with the current build, the addNode() method requires an identifier.
Right now, the example stated just calls addNode('hello', 'world'), which should be sth. like addNode('greeting', 'hello', 'world').

At least that's what gets it working for me.

Used the latest versions of Closure and the latest checkout of sigma.js.

Best,
Martin

Bouncner commented Feb 5, 2013

Just wanted to add, that the main page already has the correct code. It appears to be the github page only.

Main site:
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();

Owner

jacomyal commented Jan 11, 2014

For its new version, sigma provides a basic example - that actually works.

jacomyal closed this Jan 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment