Skip to main content
100%

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

✓ Published0🌍 Public
Tturker.turk@aselsis.com.tr
Last edited Jun 26, 2024
Created on Jun 26, 2024

This example shows a smiley face drawn with basic SVG shapes whose eyebrows animate up and down. The face is built using D3 v7 selections to append a circle, eyes, rectangular eyebrows, and a mouth arc to an SVG element. The animation runs via chained `transition().duration()` calls on the eyebrow container's `transform` attribute, moving it between two vertical positions. The mouth is generated with a D3 `arc` generator, and all elements are centered within a 960×500 SVG canvas.

AI-generated description

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

MIT Licensed

Similar vizzes