Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Jjoejkennedy
Last edited Oct 8, 2019
Created on Oct 8, 2019

A yellow smiley face with animated eyebrows demonstrates fundamental DOM manipulation with D3.js. The face is built entirely with SVG shapes selected and appended via `d3.select` and `selection.append`, including circles for the head and eyes, rectangles for eyebrows, and a path generated with `d3.arc` for the mouth. Eyebrows animate upward and back down using chained `transition.duration` calls that modify their `transform` attribute. The example uses D3 v5 and relies on SVG attributes like `cx`, `r`, and `d` to construct the static face.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes