dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.86k stars 592 forks source link

How to get label of selected node #82

Open gugguson opened 10 years ago

gugguson commented 10 years ago

I have been trying all day to create an event which triggers on mouse click on node and displays it's label. I haven't been able to find a solution on the net. Is it trivial to implement?

cpettitt commented 10 years ago

Yes, you should only need to add an onclick handler to the node. See https://github.com/cpettitt/dagre-d3/issues/67 for an example.