Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Cchezydan
Last edited Oct 11, 2020
Created on Oct 11, 2020

This D3.js example demonstrates fundamental DOM manipulation by building an animated smiley face out of SVG shapes. The face, rendered with yellow circles for the head and eyes, and a path for the mouth, is constructed using `d3.select` and `svg.append`. The animation uses chained `transition().duration(2000)` calls to move the rectangular eyebrows up and down. The code uses D3 v5 and associates the SVG with a teal background via `.style`.

AI-generated description

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

MIT Licensed

Similar vizzes