Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Ccentem
Last edited Jul 29, 2020
Created on Jul 29, 2020

A D3.js example demonstrates fundamental DOM manipulation by constructing a yellow smiley face with animated eyebrows from SVG shapes. The code appends circles, rectangles, and an arc path to an SVG group, using D3’s selection API and the `arc` generator for the mouth. The right eyebrow transitions downward over two seconds via `transition().duration(2000)`, while all elements are positioned with static attributes. The example showcases basic data-driven document manipulation with D3 v5, using inline SVG rendering and no external data source.

AI-generated description

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

MIT Licensed

Similar vizzes