Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

Viewing a saved revision (read-only)

393d01121ce748b9a1b58bd82ca497b9

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

0 stars0🌍 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.