block by mbostock db6b4335bf1662b413e7968910104f0f

Pan & Zoom Axes

Full Screen

This example demonstrates using d3-zoom to drive changes to scales’ domains via transform.rescaleX and transform.rescaleY. The transformed scales are used to draw axes. The transform is also applied via SVG transform to the colorful rainbow rect. (The colors are from Nadieh Bremer’s lovely SVG gradient tutorial.)

Updated Example →