Skip to content

Commit dc251c0

Browse files
committed
Merge pull request jacomyal#44 from edsu/master
x and y in hello world example
2 parents 28e210b + 978d882 commit dc251c0

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ This method will return an object, with its own graph and the different public m
1111

1212
To fill the graph, use :
1313

14-
sigInst.addNode('hello',{
15-
'label': 'Hello'
16-
}).addNode('world',{
17-
'label': 'World!'
14+
sigInst.addNode('hello', {
15+
label: 'Hello',
16+
x: Math.random(),
17+
y: Math.random()
18+
}).addNode('world', {
19+
label: 'World!',
20+
x: Math.random(),
21+
y: Math.random()
1822
}).addEdge('hello','world');
1923

2024
Also, a lot of different parameters are available to customize the way your instance work. For example :
2125

22-
instance.drawingProperties({
26+
sigInst.drawingProperties({
2327
defaultEdgeType: 'curve'
2428
}).mouseProperties({
2529
maxRatio: 32
@@ -52,4 +56,4 @@ To build *sigma.js* :
5256
Much thanks also to [Mathieu Jacomy](http://www.medialab.sciences-po.fr/fr/team/mathieu-jacomy/) for having developped the main plugins, and for his help on the API and his experienced advices.
5357

5458
###Want to contribute?
55-
The `TODO.txt` file at the root of the project contains different ideas of features that would improve *sigma.js*. You can also fill an [issue ticket](http://github.com/jacomyal/sigma.js/issues) if you find a bug.
59+
The `TODO.txt` file at the root of the project contains different ideas of features that would improve *sigma.js*. You can also fill an [issue ticket](http://github.com/jacomyal/sigma.js/issues) if you find a bug.

0 commit comments

Comments
 (0)