Open coryodaniel opened 4 years ago
I figured out what the bad alignment was from. The default padding on the diagram. I'm not really sure how to translate graphviz's inches to pixels for the image map to be placed in the right spot.
Using a link could disable padding? Unless someone knows some pixel/inch magic.
Hi!
I took a swing at adding clickable link support to diagrams so that nodes and edges can have links.
It is trivial to add to
svg
s as svgs natively support links. It just requires graphviz addingURL
, labelURL, or edgeURL attributes to the graph's node, edge, or label.The SVG approach comes out great, its a single file, links embedded.
To png, jpg, etc it is necessary to use
cmapx
and image maps in HTML. I had an issue though, as it generates all of the links in odd places. I think it may be due to some of the padding, but I spent a few hours trying to debug why and could not figure it out - despite everything being aligned properly when using SVG. The other caveat with non-svg images is that three files have to be created: the graph image, a cmapx file (temporary), and an HTML file.So, I have a few questions: