I would like to run a simple working code with d3.v7 (7.8.5) from a d3.v3 version. I am looking to have the same behaviours, especially drag.
Any help welcomed.
The code is available here : https://jsfiddle.net/PBrockmann/mq1etbf0/
var force = d3.layout.force()
.nodes(data.nodes)
.links(data.links)
.size([width, height])
.linkDistance([50])
.charge([-100])
.start();
Here is a try with d3.v7.js : https://jsfiddle.net/PBrockmann/cLnbeujp/
But the drag disappears after one drag.
The following jsfiddle has been updated with a working solution : https://jsfiddle.net/PBrockmann/cLnbeujp/
and
0.3 for alphaTarget gives close behaviours observed in d3.v3