Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Fork of sol lewit reproduction

Public visualization

Viewing a saved revision (read-only)

26f19d11eaa6457dbc0934580d623f9e

Refactored Fork of sol lewit reproduction

0 stars1🌍 Public
KKerim
Last edited Aug 28, 2022
Created on Aug 23, 2022

A grid of horizontal and vertical black lines is selectively revealed by two SVG masks, creating an interplay of striped regions against a white background. The visualization uses D3 v7 to generate rectangles and `d3.symbol` paths, with the masks defined via `svg.append('mask')` and applied through the `mask` attribute. The masks are constructed from white rectangles and black symbol shapes, using inverted fill logic to show or hide the lines. The code refactoring is evident in its use of a reusable `renderMask` function and D3’s data join.

AI-generated description

introduction to d3 with many useful tips