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)

f8661151e5c145edadb42e6efb78f6fc

Let's make a face with D3.js!

0 stars0🌍 Public
Cchezydan
Last edited Oct 11, 2020
Created on Oct 11, 2020

This D3.js example demonstrates fundamental DOM manipulation by building an animated smiley face out of SVG shapes. The face, rendered with yellow circles for the head and eyes, and a path for the mouth, is constructed using `d3.select` and `svg.append`. The animation uses chained `transition().duration(2000)` calls to move the rectangular eyebrows up and down. The code uses D3 v5 and associates the SVG with a teal background via `.style`.

AI-generated description

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