Skip to main content
100%

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

✓ Published0🌍 Public
BBaji-2000
Last edited Feb 20, 2022
Created on Feb 20, 2022

This example demonstrates fundamental DOM manipulation with D3.js by constructing a smiley face whose eyebrows animate upward and downward. It first builds the face using SVG shapes, including a red circle for the head, two eyes, rectangular eyebrows, and a mouth drawn with the `arc` generator. The eyebrows then move repeatedly through chained `transition` calls, each lasting two seconds, shifting their vertical position on a continuous loop. The visualization relies on D3 selections and attribute methods to create and position elements within an SVG canvas.

AI-generated description

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

MIT Licensed

Similar vizzes