Skip to main content
100%

Lets make a face with D3

✓ Published0🌍 Public
Rrpadron8
Last edited Oct 7, 2021
Created on Oct 7, 2021

This example uses D3 v5 to draw a simple smiling face entirely in SVG. It appends a yellow circle for the head, two black circles for eyes, and a mouth path created with the `d3.arc` generator, using inner and outer radii with specified start and end angles. The `select` function targets the SVG element, and attribute values like height and width are read directly from the markup. No external data is loaded; all shapes are positioned based on the SVG’s dimensions and fixed pixel offsets.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes