Skip to main content
100%

Canvas Geometric Zooming

✓ Published0🌍 Public
Mmbostock
Last edited Aug 30, 2017
Created on Sep 8, 2012

This example demonstrates geometric zooming on a canvas, where a scatterplot of 2,000 normally distributed points scales and translates as a unified image. The code uses d3.zoom with scaleExtent to handle user interaction, applying the transform directly to the canvas context via translate and scale methods. Points are drawn using the Canvas 2D API’s arc and fill operations, while the underlying data is generated with d3.randomNormal. Unlike semantic zooming, this approach redraws the entire visualization at the new scale, preserving the spatial relationships between all marks.

AI-generated description

A series of related examples:

gpl-3.0 Licensed

Similar vizzes