d3graph
d3graph copied to clipboard
Adding click event handler
The show method has a click parameter that accepts a dictionary with some style information:
show(click = {'size': 1.25, 'stroke-width': 3}, ...
This is useful but it's missing the opportunity for interaction. Adding a callback could be used to take some custom action (in addition to styling the node) such as populating a separate HTML element with node details based on the node ID.
Interesting suggestion. What would be an appropriate manner for interaction and callback?