block by mbostock 2a39a768b1d4bc00a09650edef75ad39

Pan & Zoom IV

Full Screen

This examples demonstrates using transform.applyX and transform.applyY to apply the zoom behavior’s transform to data, rather than using an SVG transform. This is typically slower because it requires modifying all two thousand elements on each zoom, but it lets you customize the display on zoom, such as rendering circles that are the same size regardless of scale; consider using Canvas.

Updated Example →

index.html