Improved d3 graph, but concurrency is a problem