Skip to main content
100%

jmbv Fork of Hello VizHub

✓ Published0🌍 Public
JJuanmaBV
Last edited Oct 26, 2022
Created on Oct 26, 2022
Forked from Hello VizHub

This example demonstrates D3.js SVG masking by drawing two sets of overlapping horizontal and vertical rectangles, each clipped by circular masks to reveal a central circular window. The code uses `d3.select` and `d3.range` to generate 100 rectangles per axis, with one mask using a black background and white circle, the other inverted. The visualization fills the browser viewport using `window.innerWidth` and `window.innerHeight`, producing a dynamic grid-like pattern visible only within the overlapping masked region.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes