🌍 Public
Viewing a saved revision (read-only)
5e516a5543b243b39e43219c22a48378
join example (rect)
A sequence of five squares illustrates data joins with D3 v6, where each square's rotation is fixed to 45 degrees and its fill color depends on the data value. The example uses `d3.select` and `.data().join()` to bind an array of numbers to SVG `rect` elements, appending a `g` container for each new datum. Values above 30 appear orange, while others are light gray, demonstrating how join callbacks manage enter selections and apply visual encodings through attribute and style setters. The SVG rendering is handled directly in the browser.
AI-generated description