Shapes with CSS & SVG
✓ Published0🌍 Public
This example demonstrates how to draw basic SVG shapes—specifically a rectangle—using the CSS styling and SVG elements directly in an HTML document. The code defines an SVG canvas with a yellow rectangle outlined in black, showcasing the interplay between HTML, CSS, and SVG markup. It also imports the `select` function from D3 version 7 to update the page body’s text content, illustrating a minimal D3 integration for DOM manipulation. The rendering relies on inline SVG, with no external data source, providing a straightforward introduction to combining D3 with SVG graphics.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed