Comparing SODA layout functions

Currently, SODA has three layout functions, each of which will produce a layout with slightly different properties:


The following CodePen examples show the application of each layout function on some random Annotations.

Interval layout

This uses an optimal interval scheduling algorithm, and it tends to look neat and orderly.

See the Pen SODA comparing layout functions by Jack Roddy (@jackroddy) on CodePen.


Greedy layout

This uses a greedy graph coloring algorithm, and it will tend to place larger annotations towards the top.

See the Pen SODA greedy layout example by Jack Roddy (@jackroddy) on CodePen.


Heuristic layout

This uses a heuristic graph coloring algorithm, and it tends to look somewhat random.

See the Pen SODA greedy layout example by Jack Roddy (@jackroddy) on CodePen.