Skip to main content
100%

Working with D3

✓ Published1🌍 Public
Aalexis.delacotte@gmail.com
Last edited Apr 7, 2026
Created on Apr 6, 2026
Forked from SVG Fundamentals

This example creates a grid of horizontal and vertical stripes that are visible only through a circular aperture in the center of the canvas. Horizontal rectangles are masked by a circle of white on black, while vertical rectangles are masked by a black circle on white, revealing the underlying pattern. The code uses D3’s `select`, `range`, and `join` methods to generate the SVG rects and masks, setting widths to the full window and heights to 500 pixels.

AI-generated description
MIT Licensed

Similar vizzes