The zoom behavior (and panning) you get is mostly free through the zoom behavior . The layout you would need to do yourself — the layout of strength — is almost the only thing in D3 that you can use to lay out a chart of this kind.
Regardless of what you use, with 20K nodes, any dynamics will be quite slow - just displaying all the elements will take quite a while, during which the browser will seem unresponsive. An alternative that you can consider is to pre-render the graph using something more suitable for large amounts of data, save the result as an image (or even a static SVG) and add a little D3 code on top for zooming / panning.
Lars kotthoff
source share