Invalid svg polyline points (NaN) exporting curved edges between overlapping nodes.
nathanal opened this issue · 0 comments
nathanal commented
Expected Behavior
Valid svg produced on export using buggy.gephi.zip
The edge is between two overlapping nodes.
I'm not sure, either the edge shouldn't be exported, or the polyline should have no points.
Current Behavior
On export, if two nodes are overlapping and have a shared edge, the path and arrows produced are invalid svg. Specifically the NaN is not valid.
<path stroke-linecap="round" fill="none" class="id_200 id_1"
d="M -166.344223,-155.416153 A 2.253508,2.253508 0,0 1,NaN,NaN"
stroke="#c0c0c0" stroke-width="0.1" stroke-opacity="1.0"/>
<!-- and further along -->
<polyline fill="#c0c0c0" fill-opacity="1.0" class="id_200 id_1"
points="NaN,NaN NaN,NaN NaN,NaN" stroke="none"/>
Following the SVG 1.1 specs, numbers are expected:
- For polyline: https://www.w3.org/TR/SVG11/shapes.html#PolylineElementPointsAttribute then https://www.w3.org/TR/SVG11/shapes.html#PointsBNF
- For paths: https://www.w3.org/TR/SVG11/paths.html#PathDataBNF
Possible Solution
Unsure, I'm just starting out the gephi/graphs in general.
If there shouldn't be any lines, simply having no points i.e. points=""
and d=""
will be fine.
Steps to Reproduce
- Open the attached project (it is simplified, only two nodes and an edge) buggy.gephi.zip (rename to buggy.gephi).
- Go to the preview tab
- Make sure Show edges, and Curved is checked (under the Edges tab)
- Export to svg
Context
Bunch of errors logged in inkscape. I guess it's not that bad.
Your Environment
- Version used: Gephi 0.10.1 202301172018
- Operating System: Linux Mint 20 (I'm running in a snap package)