Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Viewing a saved revision (read-only)

5d0d69cf0c814e91823376c8446bc274

Let's make a face with D3.js!

0 stars1🌍 Public
ZZhi Guangda
Last edited Jul 15, 2019
Created on Jul 15, 2019

This example demonstrates how to build an animated smiley face using D3.js, showing a yellow circle with eyes, eyebrows, and a mouth. The eyebrows first move upward over two seconds and then return to their original position, creating a simple raised-eyebrow animation. The code uses D3’s `select` and `append` methods to construct SVG elements, while the mouth is drawn with the `arc` shape generator. The eyebrow motion is driven by chained `transition` calls that animate the `transform` attribute.

AI-generated description

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