Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Lloisasy
Last edited Jan 21, 2020
Created on Jan 20, 2020
Forked from Untitled

This example uses D3.js to construct a cartoon face from basic SVG shapes—circles for eyes, rectangles for eyebrows, and a path for the mouth. The face is centered within a 960x500 SVG canvas, and the code animates the eyebrows by chaining `transition()` calls over two seconds to move them up and down. It imports `select` and `arc` from D3, using the `arc` API to generate the mouth's inner and outer radius path. The result is a simple, playful demonstration of D3’s shape creation and animation capabilities.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes