What is necessary to produce directed edges in sigma.js? I'm looking for a minimal example that is preferably based off of the minimal example currently on their home page.
I tried adapting the minimal graph example from the sigma.js homepage in the following way
sigma.parsers.json('data.json', { container: 'container', settings: { defaultNodeColor: '#ec5148', + defaultEdgeArrow: 'source' // adding this line should add arrows? } });
Sadly this did not produce different results.
I also tried modifying the edges in the graph itself
"edges": [ { "id": "e0", "source": "n0", "target": "n1", + "arrow": "source" }, ..., ]
But again this had no effect.
Edge arrow rendering was added in this pull request. This links to a couple of examples here and here
Sigma. js is a modern JavaScript library for rendering and interacting with network graphs in the browser. It works in symbiosis with graphology, a multipurpose graph manipulation library.
Sigma. js is an open-source JavaScript library aimed at visualizing graphs of thousands of nodes and edges, mainly developed by @jacomyal and @Yomguithereal.
I've been struggling with this issue myself. It looks like sigma.js underwent a major redesign in the last few months and the code from the examples is from an older version of sigma.js.
They do have the ability to render arrows, but the settings to generate these have changed and some of the options were lost (no longer can you specify target, source, or both; you only can use target):
"edges": [ { "id": "e0", "source": "n0", "target": "n1", + "type": "arrow", }, ..., ]
"curvedArrow" is also a valid option for type.
See this issue transcript: https://github.com/jacomyal/sigma.js/pull/219 for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With