A centering force moves a whole group of nodes toward a chosen coordinate. Unlike horizontal and vertical positioning forces, it translates the group together rather than pulling each node separately, so the group keeps its shape. section 12.4.1
Center a simulated cluster
Add `forceCenter` to a D3 force simulation: `.force("center", forceCenter().x(centerX).y(centerY))`. Set `centerX` and `centerY` to the desired coordinate. If a collision force has already spread the nodes into a nonoverlapping cluster, centering moves that cluster together instead of flattening it. section 12.4.1
Figure 12.16 The centering force moves an entire system of particles, or nodes, toward the coordinates passed to the x() and y() accessor functions.
Compare the cluster before and after centering: the nodes shift toward the specified coordinate as a group. section 12.4.1
Use centering alongside other forces when arranging a network. Positioning forces pull individual nodes toward coordinates; collision prevents overlap; centering places the resulting group without changing its overall shape. section 12.4.1 section 12.5
