Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
PPiet van Blokland
Last edited Sep 22, 2019
Created on Sep 22, 2019

A yellow smiley face is drawn with SVG shapes, and its eyebrows move up and down in a looping animation. The example demonstrates fundamental D3.js v5 DOM manipulation by chaining `transition` and `duration` calls to animate the eyebrow group’s `transform`. It uses `d3.select` to target the SVG, `d3.arc` to create the mouth path, and explicit `attr` setters for circles and rectangles, showing how D3 binds data-less elements to the document.

AI-generated description

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

MIT Licensed

Similar vizzes