sigma.js - Sigma graph not displaying, but no error message -
i'm trying make poc using http://sigmajs.org/ on gexf data generated https://github.com/splitbrain/dokuwiki-grapher/.
the attempt here, not displaying anything: http://galerie.microalg.info/profgra.html
anyone please?
that's because nodes don't have size or position.
can loop on nodes , give them need so:
sigma.parsers.gexf( 'profgra.gexf', { container: 'graph-container' }, // executed after graph loading: function(sigmainstance) { sigmainstance.graph.nodes().foreach(function(node, i, a) { // on circle: node.x = math.cos(math.pi * 2 * / a.length); node.y = math.sin(math.pi * 2 * / a.length); // default size: node.size = 1; }); sigmainstance.refresh(); } );
Comments
Post a Comment