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)

8463517b2f724ed9af8151c934ee9d33

Let's make a face with D3.js!

0 stars1🌍 Public
Ssathesujit
Last edited Aug 7, 2020
Created on Aug 7, 2020

The animation shows a yellow smiley face with eyes, eyebrows, and a mouth, where the eyebrows repeatedly move up and down in a looping motion. Built with D3.js v5, the code uses the `select` and `append` methods to construct SVG elements, and chains `transition().duration()` calls to animate the eyebrow group’s `transform` attribute between two vertical offsets. The mouth is drawn with the `arc` generator, and all coordinates are derived from the SVG’s width and height, with the face centered via a `translate` transformation.

AI-generated description

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