[Dot] Suggestion for Edge Generation in SVG
Ported Issue from Mantis Original ID: 793 Reported By: Emanuele Ruffaldi
SEVERITY: FEATURE Submitted: 2005-01-08 08:34:16
OS: --
VERSION: 2.0
DESCRIPTION
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:
edge#-#FROM#-#NODE#
This solution is really simple to implement, e.g.
edge10-15-33
is the edge 10, that connects the node 15th with 33rd
Great job with dot!