Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a smiley

Public visualization

Viewing a saved revision (read-only)

a7da79aa6d2b42b5b543ab1a5ca833d7

Let's make a smiley

0 stars0🌍 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.