Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
AAnderson Santos
Last edited Nov 14, 2019
Created on Nov 14, 2019

A smiling face built with D3.js uses basic SVG shapes—circles, rectangles, and an arc path—to demonstrate DOM manipulation and chained transitions. The code selects the SVG canvas, centers a group, and appends a yellow head, eyes, and a mouth using `d3.arc`. Eyebrows animate upward and back via two sequential `transition().duration(2000)` calls, showing non-linear interpolation of transform attributes. The example relies on D3 v5’s `select` and `arc` imports for concise shape generation and timing control.

AI-generated description

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

MIT Licensed

Similar vizzes