How can I make double click event on node in d3.js?
If using D3 Observable:
const nodeEnter = node.enter().append("g")
.on("dblclick", d => {
d3.event.preventDefault();
// do your thing
});
You can use "dblclick" instead of "dbclick":
nodes.on("dblclick",function(d){ alert("node was double clicked"); });