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)

c3cf421f83cc4fc2b954b1f7c71d1d82

Let's make a face with D3.js!

0 stars0🌍 Public
GGray1011
Last edited Jun 26, 2019
Created on Jun 26, 2019

A yellow smiley face is drawn using D3.js v5's `select` and `arc` APIs, with SVG circles for the eyes and a path for the mouth. The eyebrows, rendered as rectangles, animate upward and back downward over four seconds via chained `transition().duration(2000)` calls. The code demonstrates fundamental DOM manipulation by building the face from scratch in an SVG container, using hardcoded dimensions and positions.

AI-generated description

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