Skip to main content
100%

Lets Make a face with D3.js

✓ Published3🌍 Public
Pprincit
Last edited Mar 24, 2020
Created on Mar 24, 2020
Forked from Making a Bar Chart

This example builds a stylized face from basic SVG shapes using D3.js v5 and React. It draws a yellow circle for the head, adds eyes and eyebrows as circles and rectangles, and creates a mouth with a D3 arc generator. The eyebrows animate upward and back down using chained `transition().duration()` calls, creating a playful expression. The code selects the SVG element, calculates dimensions dynamically, and positions facial features relative to the center using translation transforms.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes