0.0.1 • Published 8 years ago
d3-force-container v0.0.1
d3-force-container
npm install d3-force-container
Constrain particles in a forceSimulation to a bounding box.
This examples uses the forceContainer to stop points from overlaping with the x axis
To use, pass an array with the position of the upper left and lower right corner of the bounding box to forceContainer:
var force = d3.forceSimulation(data)
.force("container", forceContainer([[10, 10],[890, 490]]))
0.0.1
8 years ago