SVG Fundamentals
✓ Published0🌍 Public
This example demonstrates how D3.js can generate and manipulate SVG elements to create a visual pattern. It creates 100 horizontal rectangles that span the full width of the browser window, with each rectangle positioned at increasing vertical intervals. The code uses D3’s `select` and `range` functions, along with a data join (`join('rect')`) to bind data to SVG `<rect>` elements. A mask with the ID `circle-mask` is referenced, though its definition is commented out, leaving the rectangles fully visible in the rendered output.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed