cola.js home

Unconstrained graph layout

There are no constraints in this graph. This is what happens if you use CoLa as a drop-in replacement for d3 Force layout. You should notice that compared to D3 Force layout, CoLa has much nicer convergence properties. That is, it glides smoothly to a local minimum in the layout objective function with no "jitter".

To be precise, it monotonically reduces the "stress" of the layout. It also does a noticably better job of finding a layout in which the edges are closer to their ideal lengths. In this case, you will notice that the edges are fairly uniform in length (since they are all using the default ideal length).

Compare to this constrained version of the same graph.

Here's a 3D version of the same graph!