Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Viewing a saved revision (read-only)

94b7bd1450b1464ab975d868ea583c48

Let's make a face with D3.js!

0 stars1🌍 Public
Ssslee8778960
Last edited Feb 1, 2020
Created on Feb 1, 2020

This example demonstrates fundamental DOM manipulation and animation with D3.js by constructing a smiley face from SVG shapes and animating its eyebrows. A yellow circle forms the head, with eyes, rectangular eyebrows, and an arc-based mouth positioned using D3 selections and attribute setters. The code uses d3.select, d3.arc, and chained transitions with .transition().duration() to move the eyebrow group up and down over two 2-second cycles. All elements are appended to an SVG container, with positioning handled via transform attributes.

AI-generated description

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