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)

06c96d0796eb4520a84ed1bb470b31f9

Let's make a face with D3.js!

1 star0🌍 Public
Rrebeccayc
Last edited Jan 16, 2020
Created on Jan 16, 2020

A smiling face built with SVG in D3.js animates as its eyebrows and pupils shift side to side. The example demonstrates fundamental DOM manipulation by directly selecting SVG elements and appending circles, rectangles, and a path for the mouth, with the mouth drawn using D3's `arc` generator. Animated transitions change the position of the eyebrows and pupils over two-second intervals, while static attributes set the face's yellow fill and black stroke. The code relies on D3 v5 and shows how to chain selections and transitions without data binding.

AI-generated description

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