-
Book Overview & Buying
-
Table Of Contents
Learn D3.js - Second Edition
By :
Force-directed simulations solve the problem of deciding where to place the nodes of a network diagram by integrating different forces that iteratively enforce positioning constraints. The process can be used to create not only node-link diagrams, but also clustered bubble charts and word clouds, and to reveal patterns in large scatterplots. They are great to show topology in node-link systems.
A force simulation layout function receives an array of nodes, one or more constraints configured in force algorithms, and runs for a finite number of iterations or until the simulation reaches a stable state. At each iteration, computed coordinate positions are assigned to each node.
You can create static network graphs by running several iterations of the simulation in the background and then using the computed final node positions to render the chart. The Sankey algorithm works this way. But it’s also possible to create an animated simulation, where...