Search code examples
graphgraphviz

How to add pop-out annotations in Graphviz?


I am a newbie learning to use graphviz.

Is it possible to generate interactive pop-out annotations when you move cursor around the graph? For example, hovering a node/edge will pop-out message box showing more information about it.

And if so, how?

Thank you so much for the help.


Solution

  • Depending on the output format, there are some possibilities:

    • You may create a png image and an image map and serve it as a html page. The world of html and javascript offers endless possibilities to make this interactive, use popout messages, etc.
    • If you prefer svg, some information is already included in the output as <title>, and again, if served within a browser, javascript may prove useful to enrich the output (not sure if it's possible to use existing svg with raphaeljs, but it sure shows nicely what's possible with svg + javascript).
    • You may simply have graphviz render the positions of all nodes and parse it's output to present it in your custom application