Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Mmartvdmarel
Last edited Jun 18, 2020
Created on Jun 18, 2020

A yellow smiley face with animated eyebrows is built entirely with D3.js v5 selections and SVG elements. The code uses `d3.select` to target an SVG container, `d3.arc` to draw the mouth as a path, and chained `transition.attr` calls to repeatedly move the eyebrows up and down over 2-second intervals. Circles and rectangles form the eyes and brows, with positions calculated relative to the SVG center.

AI-generated description

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

MIT Licensed

Similar vizzes