Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000793graphvizDotpublic2005-01-08 03:342013-07-11 11:34
ReporterEmanuele Ruffaldi 
Assigned Togviz 
StatusacknowledgedResolutionno change required 
PlatformOS*-*-OS Version
Summary0000793: Suggestion for Edge Generation in SVG

I had the necessity to add interactivity to the SVG graph generated by dot.
In particular to be able to associate the start and end node to a
specific edge.

In the current SVG generation nodes are numbered as node# where # is odd and
edge# where # is pair. The problem is that there is no possibility
to retrieve the end and start node from the edge#. This information
is fundamental in an SVG graph where I navigate graphically the edges, and
blink the end node when the navigation is terminated.

To retreive this information I had to patch the generated SVG by using the
node/edge information from the DOT file. I've chosen the following notation
for the id="edge#" allowing to preserve the original semantic and
adding the node values:


This solution is really simple to implement, e.g.


is the edge 10, that connects the node 15th with 33rd

Great job with dot!
TagsNo tags attached.
FIX-COMMENT It's a request for feature
VERSION     2.0
Attached Files

- Relationships

-  Notes
User avatar (0000374)
erg (administrator)
2013-06-27 20:53

I wouldn't be hard to add this, but the hooks are already available for you to handle this. (I'll ignore just using the node names in the comments before each node and edge. This won't work for multiedges and your svg parser may throw out the comments.) I'd suggest just doing the following:

gvpr -c -fid.g yourgraph.gv | dot -Tsvg > out.svg

where id.g is a file containing

  int nid, eid, map[node_t];
  $tvtype = TV_ne;
N {
  map[$] = nid++;
E {

In this way, if you decide some other form of svg id is better for another application, you can simply modify id.g to get the new form.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => user1
2013-06-27 20:53 erg Note Added: 0000374
2013-07-11 11:34 erg Priority normal => low
2013-07-11 11:34 erg Severity minor => feature
2013-07-11 11:34 erg Description Updated View Revisions

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker