Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Let's make a face with D3.js!

0 stars1🌍 Public
Ssam-leb
Last edited Jul 3, 2020
Created on Jul 3, 2020

A yellow smiley face is drawn in an SVG canvas using D3.js v5, with select and arc methods constructing the head, eyes, and mouth. The eyebrows, rendered as rectangles, animate upward and back down over two seconds via chained transition().duration() calls, demonstrating staged DOM updates. The face is centered using an SVG group with a translate transform, and the mouth is generated from an arc path with specified inner and outer radii.

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