javascript - Sigma.js. Directed graph. Arrows don't render -
i have problem rendering arrows of directed graph sigma.js.
my gexf graph:
<?xml version="1.0" encoding="utf-8"?> <gexf xmlns="http://www.gexf.net/1.2draft" version="1.2" xmlns:viz="http://www.gexf.net/1.2draft/viz" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd"> <meta lastmodifieddate="2015-05-11"> <creator>gephi 0.8.1</creator> <description></description> </meta> <graph defaultedgetype="directed" mode="static"> <nodes> <node id="startnode" label="initial resources"> <attvalues></attvalues> <viz:size value="1.0"></viz:size> <viz:position x="1.0" y="1.0" z="0.0"></viz:position> <viz:color r="153" g="153" b="153"></viz:color> </node> <node id="node1" label="node1"> <attvalues></attvalues> <viz:size value="1.0"></viz:size> <viz:position x="100.0" y="0.0" z="0.0"></viz:position> <viz:color r="153" g="153" b="153"></viz:color> </node> <node id="node2" label="node2"> <attvalues></attvalues> <viz:size value="1.0"></viz:size> <viz:position x="200.0" y="0.0" z="0.0"></viz:position> <viz:color r="153" g="153" b="153"></viz:color> </node> </nodes> <edges> <edge source="startnode" target="node1" label="res1"> <attvalues></attvalues> </edge> <edge source="node1" target="node2"> <attvalues></attvalues> </edge> </edges> </graph> </gexf>
my sigma.js script:
s = new sigma({ container : 'content', renderer : { container : document.getelementbyid('content'), type : 'canvas' }, settings : { minnodesize : 12, maxnodesize : 12 }, drawingproperties : { defaultedgearrow : 'source' } }); sigma.parsers.gexf('../resources/text.gexf', s, function() { s.refresh(); });
i tried add defaultedgearrow property settings , renderer block - doens't work.
please, help. thank answers.
s = new sigma({ renderer: { container: document.getelementbyid('content'), type: 'canvas' }, settings : { maxedgesize: 5 } }); sigma.parsers.gexf('graph.gexf', s, function() { s.graph.edges().foreach(function(edge){ edge.type = "arrow"; }); s.refresh(); });
take @ http://plnkr.co/edit/hrb0hmzt6txdpxv3bffq?p=preview
it's plunkr code, work sigma 1.0.3
Comments
Post a Comment