🌍 Public
Viewing a saved revision (read-only)
43d37c1b2517481c90ffb8891bc7c7d7
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