Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Ssfloyd11
Last edited Jan 15, 2021
Created on Jan 15, 2021

A smiling face rendered in SVG animates its eyebrows up and down via D3 transitions. The visualization uses `d3.select` to manipulate the SVG, `d3.arc` to construct the mouth path, and chained `transition.attr` calls to move the eyebrow rectangles over two-second durations. The code demonstrates fundamental DOM manipulation with D3 v5, importing `select` and `arc` via ES6 modules, and lays out the face using hardcoded pixel offsets for the eyes, eyebrows, and mouth within a 960×500 viewport.

AI-generated description

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

MIT Licensed

Similar vizzes