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 stars1🌍 Public
AAnthony Lee
Last edited Sep 1, 2022
Created on Sep 1, 2022

This example uses D3.js v5 to draw a yellow smiley face centered in an SVG canvas, with black-bordered circles for eyes and a path-shaped mouth created via the `d3.arc()` generator. The code demonstrates basic DOM manipulation by appending geometric shapes to a group element, then animates the eyebrows—two rectangles—through a two-second `transition().duration(2000)` sequence that moves them up and down once. Rendering is entirely SVG, with an embedded YouTube video illustrating the resulting motion.

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