Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Aash301
Last edited Feb 19, 2023
Created on Feb 19, 2023
Forked from D3 Starter

This example demonstrates how D3 version 7 renders basic SVG shapes—circles, rectangles, and a line—within an HTML page. The SVG markup shows explicit styling through inline attributes (like `fill="red"` or `stroke-width="5"`) and group elements using `transform` for positioning and scaling. A separate `styles.css` file resets body margins and hides overflow, while D3 is loaded from a CDN but not used for drawing. The code also references a `bundle.js` file, indicating a potential bundling step, though the visible shapes are static and rely solely on SVG and CSS rather than dynamic D3 data binding.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes