Skip to main content
100%

Let's make a smiley

✓ Published0🌍 Public
SSrishti2398
Last edited Jan 4, 2020
Created on Jan 4, 2020

This example demonstrates fundamental DOM manipulation by constructing an animated smiley face. A circle forms the head, with smaller circles for eyes and rectangles for eyebrows, while an arc path creates the mouth. The eyebrows animate vertically using chained `transition().duration()` calls on a group element. Built with D3 v5, it uses `select`, `append`, and `attr` to position SVG shapes relative to a centered group, with a static background color set via inline styles.

AI-generated description

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

MIT Licensed

Similar vizzes