block by mbostock b418a040bb28295e4a78581fe8e269d1

Pan & Zoom II

Full Screen

This examples demonstrates using transform.apply to apply the zoom behavior’s transform to data, rather than using a Canvas transform. This is typically slower, but it lets you customize the display on zoom, such as rendering circles that are the same size regardless of scale. This technique is similar to repositioning SVG elements on zoom.

Updated Example →

index.html