This is the first step of the zoom-tutorial D3 Zoom: The Missing Manual.
Here's a list of all code steps:
Step 1: static visual Step 2: geometric SVG zoom Step 3: semantic SVG zoom Step 4: geometric Canvas zoom Step 5: semantic Canvas zoom Step 6: programmatic zoom (bonus) Step 7: design (bonus)
Go here for all the code in one repo.
Built with blockbuilder.org
https://d3js.org/d3.v4.js