mountainstorm/jquery.graphviz.svg

Any example to use tooltip ?

Opened this issue · 1 comments

Any example to use tooltip ?

in case you use .dot file as originating input file, then use attribute tooltip for nodes, edges:

tooltip
Tooltip annotation attached to the node or edge. If unset, Graphviz will use the object's label if defined. Note that if the label is a record specification or an HTML-like label, the resulting tooltip may be unhelpful. In this case, if tooltips will be generated, the user should set a tooltip attribute explicitly.
http://www.graphviz.org/content/attrs#dtooltip
http://www.graphviz.org/content/svg-file-hover-over-node-text

Example t1.dot file - node/edge:
"80:0:bindtextdom.c:__bindtextdomain"[label="80:0:__bindtextdomain",height=0.4,width=0.6,color="black", fillcolor="wheat1", style="rounded,filled", fontcolor="black", penwidth = 0.9, fontsize="9", tooltip="80:0:__bindtextdomain"];
"61:1:dfa.c:dfaanalyze"->"61:18:dfa.c:alloc_position_set"[label="16",color="black",penwidth="0.2",tooltip="61:1:dfa.c:dfaanalyze->61:18:dfa.c:alloc_position_set"];

Then using command line dot -Tsvg -o t1.svg t1.dot
Maybe this comment helps you.