From: Emmanuel P. <pie...@lr...> - 2005-10-06 14:00:33
|
Chuck Fox wrote: > Hi all, > First off, zgrviewer is a great program, its the only one that I've= =20 > seen capable of actually displaying > a graph with > 100 nodes with any performance :) Thanks ! > I have a feature request that I would also be willing to work on with= =20 > a little more direction. As you all > know the nodes/edges in graphs can have URLs assigned to them that you=20 > can click on to pop up > the web browser. Graphviz also allows you to embed tooltips which pop=20 > up when a mouse-over occurs > in a web browser over an edge/node.=20 > For graphs that are small enough to be displayed in Firefox this work= s=20 > with SVG files and can be very useful for embedding more information=20 > about edges/nodes that can interactively pop up.=20 > My question is, how difficult would it be to add the mouseover events= =20 > to zgrviewer so that the tooltip > data could be displayed in the same way?=20 There are two issues to address here: 1) for performance reasons, we do not detect when the mouse crosses an=20 edge, but only nodes. You can do picking to find out whether the current=20 cursor position is intersecting an edge, but this picking is not done=20 automatically when the mouse cursor moves (whereas it is for nodes). We=20 could call the picking function on VPath elements (which represent=20 edges) everytime the cursor is moved. But it is likely to have a strong=20 impact on performance for big graphs, and until now there was no reason=20 to do it (what we detect is cursor entry/exit in/out of a shape, and=20 technically you never enter or exit an edge, you just cross it). So,=20 displaying a popup when entering a node is easy. As far as edges are=20 concerned, there is an easy way of doing it, but it is likely to be=20 expensive. 2a) right now, the SVG interpretor on which ZGRViewer relies (in ZVTM)=20 does not take tooltips into account. At least I think so, I've never=20 actually looked into that matter. So the 2nd thing to do would be to=20 extend the SVG interpretor to allow it to send tooltip information to=20 ZGRViewer. Once this information is available, writing the code that=20 shows/hides tooltips is trivial. 2b) another, easier, solution would be to use the new yet-to-be-released=20 ZGRViewer pipeline, written by an M.Sc. student of mine, that relies on=20 the enriched DOT format instead of SVG. The displayed result is the=20 same, but with this pipeline ZGRViewer knows about the logical structure=20 of the graph, and we hope to make use of this knowledge to enhance the=20 features and interaction in ZGRViewer. This pipieline is however not yet=20 fully working (in the sense that it does not support all of the DOT synta= x). Do you have any idea how the tooltips are represented in the SVG output?=20 Could you send me a basic DOT+SVG example that features tooltips? --=20 Emmanuel Pietriga INRIA Futurs - Projet In Situ tel : +33 1 69 15 34 66 Bat 490, Universit=E9 Paris-Sud fax : +33 1 69 15 65 86 91405 ORSAY Cedex http://www.lri.fr/~pietriga |