Skip to main content
100%

Let's make a face with D3.js!

✓ Published5🌍 Public
Ccathykan
Last edited Apr 22, 2020
Created on Apr 21, 2020
Forked from HTML Starter

This interactive example uses D3.js v5 to draw a cartoon face from basic SVG shapes, including a yellow circle, two eyes, eyebrows, and a mouth constructed with an arc path. The code builds the face by appending circle, rect, and path elements inside SVG groups, then animates the eyebrows through a sequence of `transition().duration(2000)` calls that shift their position horizontally and vertically. The rendering relies on D3’s `select`, `append`, and `arc` APIs, with all elements centered via a group transform. The animation cycles through multiple eyebrow movements, demonostrating how D3 transitions can orchestrate timed attribute changes.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes