graph-viz-d3-js icon indicating copy to clipboard operation
graph-viz-d3-js copied to clipboard

This framework can respond to node mouse events? If can, how to use?

Open hzy729 opened this issue 8 years ago • 5 comments

This framework can respond to node mouse events? If can, how to use?

hzy729 avatar Jan 18 '17 03:01 hzy729

Currently there is no way to receive mouse events. What do you mean by respond to?

mstefaniuk avatar Jan 18 '17 07:01 mstefaniuk

respond to mouse Click ,for example :click a node , jump to a url for get info .

hzy729 avatar Jan 19 '17 06:01 hzy729

URL on node is supported by Graphviz format itself but not supported in my online version. It can be fixed quite quickly. Do you find any other usages of click handlers than following a link?

mstefaniuk avatar Jan 22 '17 08:01 mstefaniuk

+1 Would be nice to merge (mouse) selected nodes into a big one, and after click on big node it would expand to its original parts. Is it hard to do with current setup? I'd like to help to create this feature.

PEZO19 avatar May 03 '17 00:05 PEZO19

@PEZO19 This graphviz renderer generates final result from dot source using viz.js. If you want to hide several nodes into one it can be achieved using only by modification of original dot source. We can consider one simplification that hidden nodes must be already grouped in subgraph and then rendering will replace subgraphs with a node and then clicking on a node will re-render stage with hidden content.

mstefaniuk avatar May 06 '17 19:05 mstefaniuk