Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
OOxfordComma
Last edited Oct 29, 2018
Created on Aug 24, 2018

A smiley face assembled from SVG shapes animates in D3.js v5: a yellow rectangle transitions to green, and two eyebrows rotate as the mouth flips upside down. The code demonstrates fundamental DOM manipulation with `d3.select`, appending grouped circles, rectangles, and an `d3.arc`-generated path into an SVG canvas. Transitions via `.transition().duration(2000)` smooth the color and transform changes over two seconds.

AI-generated description

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

MIT Licensed

Similar vizzes