Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
Bouncner opened this Issue · 2 comments

2 participants

@Bouncner

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

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

@jacomyal
Owner

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

@jacomyal jacomyal closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.