Passing through line feeds via tooltip

The underlying href attribute "title" allows linefeeds in the text, but that doesn't seem to be possible in graphviz via the "tooltip" attribute on a node: passing this to a graphviz renderer causes it to fail, e.g.:

Graph render error: input:5: syntax error near line 5

Is there a workaround that will allow one to pass the linefeed through to "title" via dot?

This is actually a problem in

This is actually a problem in HTML. Until recently, there was no standardized technique for getting multiple lines in a tooltip. There were various hacks specific to various browsers. My understanding is that most recent browser versions now support 
 as a means for getting a newline:

    tooltip =  "hello

You can actually use a newline character but this means you need to use HTML-strings:

    tooltip =  <hello


Also, this apparently doesn't work in raw svg, but it does work in html and svg embedded in html. It is probably safer to use the first approach.

By the way, what tool are you using that produces the message:

   Graph render error:


Oh I see. Ok thanks I'll

Oh I see. Ok thanks I'll try &#10;

I'm using a graphviz visualization server.

Tooltip doesn't work at all on my dot file

Hello All,

I had a trouble with tooltip definition since it works only for few objects of my graph after svg conversion.

Till now I'm not explaining why the default tooltips are shown like node name or label but I'm not able to force it.

Thanks to your suggestion above I added "multi line" tooltips, but till now I tried to force it, without success.

In case, I can pass the full code on my graph

Do you know a possible reason why tooltips doesn't work at all?

I tried also to show svg file on Chrome and Firefox, but exploring the code I don't found them phisically inside the svg file... maybe I have to use a different compile statement?... currently I'm using "dot -Tsvg <input file name> -O.



It would be helpful if you

It would be helpful if you could post your original graph, and your svg output. (Replace .svg with .txt to upload the svg to the forum.)

Note that in svg, tooltips are stored as xlink:title. Also, unless you use style=filled, the tooltip will not appear unless the cursor is over the text or the boundary.

Files uploaded

Hi Erg,

Just to report you the file attached... hope I did the things in the right way :-)

Thanks and Best Regards,

Attached Graph definition and SVG


Attached Graph definition and SVG

Hello Erg, Thank you so much. I report below the graph and SVG file.
Many Thanks!


I believe I found the issue on Tooltip

Hi Erg,

Manipulating my graph file, I discovered that the node definition occurred twice:

the first time reporting the correct tooltip but the second the tooltip is blank... so it was cleared.

I believe the issue was here since I'm using an automatic script to generate such graph, I have to check it .

Thanks anyway for your double checks!!!

... Graphviz is a powerfull/wonderfull tool.. fantastic..



Yes, see

Yes, see I'm glad the problem is solved.

Recent comments