Skip to main content
100%

Fork of Let's make a face with D3.js!

✓ Published0🌍 Public
Kkatebacon32
Last edited May 13, 2021
Created on May 13, 2021

This example displays a yellow smiley face with eyes, eyebrows, and a mouth drawn as SVG shapes. The code uses D3.js to select the SVG element, append groups for facial features, and apply geometric attributes like radius and positioning. An animated sequence moves the eyebrows up and down by chaining two d3 `transition` calls, each with a 2000-millisecond duration. The mouth is created with D3's `arc` function, defining inner and outer radii and angle parameters.

AI-generated description

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

MIT Licensed

Similar vizzes