Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

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

0 stars0🌍 Public
JJeremie
Last edited Sep 25, 2021
Created on Sep 25, 2021

A D3.js smiley face animation demonstrates basic DOM manipulation with SVG shapes. The yellow face, eyes, and mouth are drawn using D3 selections and the `arc` generator, while the eyebrows move up and down through chained `transition` calls over 2000ms intervals. The code uses `select` to target the SVG element, dynamic width and height attributes, and group elements (`g`) to structure the face components. The animation loops by transitioning the eyebrow group's transform attribute back and forth.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed