Skip to main content
100%

EDIT: Fork of Let's make a face with D3.js!

✓ Published0🌍 Public
Nnutmegsashimi
Last edited Jan 27, 2021
Created on Jan 27, 2021

This example demonstrates fundamental DOM manipulation with D3.js by animating a smiley face whose eyebrows rise and fall. It shows how to build SVG shapes—circles for the eyes, rectangles for the eyebrows, and an arc for the mouth—using D3 selections and the `arc` generator. The eyebrows transition vertically over a four-second cycle via chained `transition().duration()` calls. The code uses D3 v5, selecting the SVG element and appending groups to position features around the center of the canvas.

AI-generated description

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

MIT Licensed

Similar vizzes