1

I created a graph through Graphviz. The weights on the edges are table of links. I want this table to be expandable/collapsible by click or mouse hover. I created this graph and tables the following way(* In this example exist a table only on one edge.):

digraph prof {
    ratio = fill;
    node [style=filled, fillcolor=lightblue];
    bees->larvae[label=2,penwidth=0.5]
    cattle->dog[label=1,penwidth=0.25]
    .
    .
    .
    jackal->dog[label=1,penwidth=0.25]
    pigs->flying[label=1,penwidth=0.25,label=<<table>
    <tr><td href="http://google.com">Google</td></tr>
    <tr><td href="http://bing.com">bing</td></tr>
    </table>>]

}

So, how can I make this table collapsible/expandable? Thanks..

  • What do you mean by click or mouse hover? What target medium have you choose for the graphviz output? As an example, a simple image cannot have "clicks" or "mouse hover events". – Progman Jun 14 '20 at 09:59
  • The output file is SVG. In the above implementation I can see a table with links. Can I make this table collapsible/expandable or it can't be done with SVG files? – Oded Ben Noon Jun 14 '20 at 10:08
  • Actually yes. thank you – Oded Ben Noon Jun 17 '20 at 09:08

1 Answers1

0

You will need to use javascript to do that. But you will probably run in to problems like wanting the layout to change depending on the node size. I would recommend using a popup when inspecting the node details though you probably still need to use javascript

Jens
  • 2,327
  • 25
  • 34