Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Understanding the zoom on d3.js

Public visualization

Viewing a saved revision (read-only)

af259e864f41438b824f080978d51349

Understanding the zoom on d3.js

0 stars1🌍 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