Anthony Liekens
Anthony Liekens

Reputation: 1081

Get rid of "_anonymous_0" tooltips in SVG with GraphViz

I generate SVGs using Graphviz. When embedded in HTML, the nodes, edges and arrows show an "_anonymous_0" tooltip. Can I get rid of these from within GraphViz?

Upvotes: 9

Views: 2256

Answers (2)

stefan
stefan

Reputation: 3759

Found by trial and error :-)

digraph "my title" {
tooltip=" "
node [tooltip=" "]
edge [tooltip=" "]
...
}

disables the automatic generation of tooltips.


an empty string

tooltip=""

does not(!) disable the generation.

Upvotes: 14

marapet
marapet

Reputation: 56556

If your dot source start something like this:

digraph { 

it may help to use the following:

digraph "" {

It looks like the name of the graph (digraph mygraph { ) is transformed to a title element (<title>mygraph</title>). If you omit the name, *anonymous_0* is used instead. But if "" is used, no title element is being created.

There may be a better solution to this though...

Upvotes: 10

Related Questions