Skip to main content
100%

2 Let's make a face with D3.js!

✓ Published0🌍 Public
RRolftest
Last edited Oct 23, 2021
Created on Oct 23, 2021

A yellow smiley face is drawn with SVG shapes, using a circle for the head, two circles for eyes, rectangles for eyebrows, and a path for the mouth. The example demonstrates fundamental D3.js DOM manipulation and animation by using `d3.select` to target the SVG, `d3.append` to add elements, and chained `transition` calls with a 2000-millisecond duration to move the eyebrows up and down. The code also uses `d3.arc` to calculate the path for the mouth shape.

AI-generated description

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

MIT Licensed

Similar vizzes