Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there event listeners to detect mouse clicks on dot/SVG graph?

Tags:

svg

graphviz

dot

I am playing with generating dot files and then turned them into SVG graphs with a lot of nodes.

My question is that are there event listeners to detect mouse clicks on dot/SVG graph nodes?

For example, right click on a node in the SVG graph, I do something(maybe get the related information from the node and then do something),

Then how to generate dot file or SVG file to achieve this?


1 Answers

There are several ways to create an interactive SVG graph:

  • Use SMIL, an extension to svg (Example tutorial http://apike.ca/prog_svg_smil.html)
  • Javascript (the Raphael library is excellent)
  • CSS animations

In any case, you'll have to display the svg graphs in a client which supports any of those technologies (browser), and you will have to code it in addition to the svg output graphviz creates.

like image 69
marapet Avatar answered Oct 27 '25 04:10

marapet