oxfordinternetinstitute / gephi-plugins

Switch to the sigmaexporter-plugin branch (https://github.com/oxfordinternetinstitute/gephi-plugins/tree/sigmaexporter-plugin/modules/sigmaExporter) or jsonexporter-plugin branch (https://github.com/oxfordinternetinstitute/gephi-plugins/tree/jsonexporter-plugin/modules/JsonExporter) for the relevant code.
http://blogs.oii.ox.ac.uk/vis/
63 stars 28 forks source link

arrow heads not showing on edges #62

Closed bgriffen closed 8 years ago

bgriffen commented 8 years ago

I added

  "defaultEdgeArrow": "target"

to my config.json file and added the "arrow":"source" attribute to my edges component of the data.json file but they still don't appear in my graph.

{"target": "37", "color": "rgb(0,109,44)", "source": "36", "attributes": {},"arrow":"source", "id": "2466", "size": 108.0}

Any help would be great. There is some discussion here and here but there seems to be no solution. I ideally would like this to work for straight or curved edges.

bgriffen commented 8 years ago

Anyone able to take a look at this form me please? Thanks!

computermacgyver commented 8 years ago

Hi bgriffen. The plugin uses the original 0.8 version of sigma at the moment. Arrows do not appear on curved edges, but do appear on straight edges if you change defaultEdgeType to line in the config.json file "defaultEdgeType": "line", If that doesn't work, I can dig up my modifications to sigma to add arrows to straight edges or you can use the newer (1.0) version of sigma (but then not this plugin). A newer version of the plugin with the new version of sigma is in the works and once this is out edge arrows will be easier to add, but this will take a bit of time.

bgriffen commented 8 years ago

Thanks though even when I set defaultEdgeType to line, they still don't appear with arrows. Is there something else I need to set?

Example image.

roseaysina commented 7 years ago

Thanks though even when I set defaultEdgeType to line, they still don't appear with arrows. Is there something else I need to set?

I have the same problem. Even if to use updated versions of Sigma.js and Gephi. Result is the same with all options: line, curvedArrow, arrow and curve.

Please, help.

schignel commented 6 years ago

I am having the same problem as @bgriffen and @RoseAysina. Has anyone managed to get arrows to appear on the exported graph?

computermacgyver commented 6 years ago

Looks like I added this to the GitHub repo 2 years ago, but didn't ever repackage the plugin to include it.

You'll have to update the index.html file, add js/canvasutilities.js, and replace js/sigma/sigma.min.js as per this commit.

In addition, you will need to open your config.json file in a text editor (e.g., notepad) and add/change "defaultEdgeType" to "arrow".

Alternatively, you can use the latest version of Sigma.js directly without the HTML/JS in this repository, which is for an older version.

schignel commented 6 years ago

Hi @computermacgyver, I believe I've followed your instructions and am still not getting any arrows in my graph. I've attached my index and config files here.

Here is it in Gephi: image

And here in the Sigma export: image

I am very new to sigma.js and web development in general, so I apologize if I'm missing something obvious.

config and index.zip

luckyb56 commented 6 years ago

@computermacgyver Would it be possible to make it work with this properties? : "drawingProperties": { "defaultEdgeType": "curve", "defaultEdgeArrow": "target" }

Like in example http://hansifer.com/sigmaArrowDemo2.htm