Skip to main content
100%

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

✓ Published0🌍 Public
RRealAlpha
Last edited Apr 15, 2021
Created on Apr 15, 2021

This example demonstrates fundamental DOM manipulation with D3.js by building a yellow smiley face with eyes, eyebrows, and a mouth. The code appends SVG circle and rectangle elements to a central group, then animates the eyebrows upward and back down using chained `transition` calls with a 2-second duration each. The mouth is drawn with the `d3.arc` generator using specified inner and outer radii and start/end angles. All elements are positioned via explicit pixel coordinates within a 960-by-500 SVG canvas.

AI-generated description

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

MIT Licensed

Similar vizzes