Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Let's make a face with D3.js!

0 stars1🌍 Public
WWesley Yuen
Last edited Jan 16, 2020
Created on Jan 16, 2020

A yellow smiley face is drawn in SVG, and its eyebrows animate upward and downward in a looping motion. The face is built entirely through D3.js v5 selections, appending circles for the eyes and a path created with the `arc` generator for the mouth. Eyebrow movement is driven by chained `transition().duration()` calls that alternate the eyebrow group’s vertical translation. The code imports `select` and `arc` from D3 and positions all elements relative to the SVG’s center.

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