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 stars1🌍 Public
RRadha246
Last edited Feb 20, 2022
Created on Feb 20, 2022

This example builds a cheerful, animated smiley face using D3.js (v5) and SVG. It demonstrates core DOM manipulation and transitions by drawing a yellow head, eyes, eyebrows, and a mouth with the `d3.arc` path generator. The code sequentially applies a 2-second `transition` to shift the eyebrow group vertically, creating a bobbing motion. The face is centered and scaled relative to the SVG’s dimensions, with all shapes positioned using calculated offsets for eyes and brows.

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