Given a singly linked list like this:
[
{
uid: 'a',
full_name: 'Angela Augustine',
next: 'c',
},
{
uid: 'b',
full_name: 'Ben Botticelli',
next: 'd',
},
{
uid: 'c',
full_name: 'Carl Campbell',
next: 'a',
},
{
uid: 'd',
full_name: 'Dalia Douglass',
next: 'b',
},
{
uid: 'e',
full_name: 'Eva Ernst',
next: 'a',
},
{
uid: 'f',
full_name: 'Franklin Fishburne',
next: 'a',
},
{
uid: 'g',
full_name: 'Grant Gordon',
next: 'a',
},
{
uid: 'h',
full_name: 'Heather Highgarden',
next: 'a',
},
]
How would you arrange the nodes in two dimensions for clarity?
The Reingold-Tilford algorithm that @mbostock uses in Radial Reingold–Tilford Tree is very nice looking, but breaks down in our use case because it doesn't have any cycles. Ours won't have a single node in the center without a pointer.
Maybe this will work: http://bl.ocks.org/mbostock/1153292
This is now live at https://demo.liquid.vote