Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

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

0 stars0🌍 Public
Jjaredzhou
Last edited Jun 17, 2021
Created on Jun 17, 2021

A smiling face built entirely with SVG elements demonstrates basic D3.js DOM manipulation and animation. The code uses `d3.select` to create circles for the eyes, rectangles for the eyebrows, and a `d3.arc` path for the mouth, all within a centered group. The eyebrows animate upward and back down via chained `transition().duration(2000)` calls on the group's transform. Rendered at 960×500, the face is drawn with yellow fill and black strokes, showing how D3 v5 handles simple geometric shapes and timed state changes.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed