tooltip in dot (graphviz)
Asked Answered
A

1

7

I have the following graphviz file:

digraph ServerDependency {
    Server02 -> Server01 [tooltip="Database"];
    Server02 -> Server06 [tooltip="Images"];
}

dot -Timap -oserverdependency.map -Tgif -oserverdependency.gif serverdependency.gv

Then I have a html file that looks like this:

<html>
<head>
</head>
<body>
<A HREF="serverdependency.map"><IMG SRC="serverdependency.gif" ismap="ismap"/></A>
</body>
</html>

Based on the name tooltip I would expect to hover over the node and see the text, but I don't.

How can I change the command or html to actually be able to hover over the node to see the tooltip.

I am following the example at this URL about 1/3 down the page: https://www.graphviz.org/doc/info/output.html

Aswan answered 17/2, 2019 at 3:30 Comment(0)
B
4

It looks like you are trying to output to a .map and .gif format. I am unsure about .map but .gif doesn't support tooltop as the image doesn't support a hover over type.

Try outputting to .svg as well and opening this in a browser.

dot -Timap -oserverdependency.map -Tgif -oserverdependency.gif -Tsvg -oserverdependency.svg serverdependency.gv 
Bandbox answered 15/4, 2019 at 14:58 Comment(3)
I was thinking (perhaps incorrectly), that the .map overlayed something on the .gif that added the hover help. I was just trying to make the example work (but the example is not clear). I am voting you up but no marking as the answer until I can get some time to try your answer.Aswan
In the documentation at the start the notes for tooltop say it works for svg, cmap only. graphviz.org/doc/info/attrs.htmlBandbox
I marked this as the answer based on the documentation; I did not get a chance to test it myself.Aswan

© 2022 - 2024 — McMap. All rights reserved.