Skip to main content
100%

Let's make a face with D3.js! MW

✓ Published0🌍 Public
MMillie White
Last edited Jan 7, 2022
Created on Jan 7, 2022

A yellow smiley face drawn with SVG shapes demonstrates basic D3.js DOM manipulation and transitions. The code uses `d3.select` to build a circle, eyes, and an arc-based mouth from the `d3.arc` API. Two rectangular eyebrows animate upward and downward via chained `transition().duration()` calls, moving in a looping motion. The face is centered using a group transform, with all elements rendered in a 960 by 500 SVG canvas.

AI-generated description

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

MIT Licensed

Similar vizzes