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
Solution 1 :
Problem :
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..
Comments
Comment posted by Progman
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”.
Comment posted by Oded Ben Noon
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?
Comment posted by Oded Ben Noon
Actually yes. thank you