Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
LLincolnBollschweiler
Last edited Dec 10, 2021
Created on Dec 10, 2021
Forked from D3 Starter

This example creates a smiling face using SVG shapes styled with CSS and D3. The code draws a yellow circle for the head, two black circles for eyes, and a path for the mouth using d3.arc() with defined inner and outer radii. SVG attributes like cx, cy, and r position each element relative to the 960x500 viewport. A coral background is applied to the SVG via D3's selection style method, demonstrating basic shape creation and attribute manipulation with d3.select and d3.append.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes