Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

graphviz - multiple links per label

Tags:

svg

graphviz

I was looking for a away to add more than one link to a label for svg export, but I can't have more than one edge.

Right now I have something like this:

Node1 -> Node2 [ href="some.resource.xyz", label="Resource\nAdditionalInfo" ]

What I need though is to have something like this:

Node1 -> Node2 [
  label="Resource\n              # href to "some.resource.xyz"
         Additional Information" # href to some.additional.info
]
like image 991
Johannes Avatar asked Dec 23 '16 20:12

Johannes


1 Answers

Use HTML label and define a table with two cell with different values for HREF attribute

Example:

digraph {
    A->B
    B[label=<<table>
    <tr><td href="http://google.com">Google</td></tr>
    <tr><td href="http://bing.com">Bing</td></tr>
    </table>>]
}
like image 82
Jens Avatar answered Nov 10 '22 06:11

Jens