Skip to main content
100%

Understanding the zoom on d3.js

✓ Published1🌍 Public
Rrigt
Last edited Dec 2, 2018
Created on Dec 2, 2018

This example demonstrates an interactive zoom on a time-series area chart of S&P 500 monthly closing prices from 2000 to 2010. Initially, the view animates from a transformed scale to a default extent over two years, using `d3.zoom()` and `d3.zoomIdentity` to rescale the time axis. The chart is rendered as an SVG, with a clipped area path and axes updated during the zoom transition. Data is loaded from `sp500.csv`, and the zoom is implemented with a 1.5-second transition.

AI-generated description
MIT Licensed

Similar vizzes