Generating a directed graph in JavaScript is hard, here's how we did it
medium.com