Skip to main content
100%

Sol LeWitt-d3

✓ Published1🌍 Public
Bbillzhou2005
Last edited Jan 6, 2023
Created on Jan 5, 2023
Forked from Sol LeWitt

This example renders a full-screen SVG composed of 100 horizontal rectangles, each 10 pixels tall and spaced 20 pixels apart. The rectangles are masked by a circular pattern, creating an effect reminiscent of Sol LeWitt’s wall drawings. The visualization uses React and is built with d3.select, d3.range, and the data-join pattern via the .join('rect') method, while the SVG mask is defined in the marks array as 'url(#circle-mask)'. The code also demonstrates dynamic sizing based on the browser window dimensions.

AI-generated description

A demostration for SVG shapes

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes