Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

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

0 stars0🌍 Public
Kkaruppuraja
Last edited Mar 1, 2021
Created on Mar 1, 2021

A smiley face rendered in SVG with D3 v5 demonstrates fundamental DOM manipulation. The face consists of a yellow circle, two eyes, rectangular eyebrows, and an arc-based mouth created using `d3.arc()`. The eyebrows animate upward and back downward over four seconds via chained `transition().duration()` calls, shifting the eyebrow group's `translate` transform. The code uses `d3.select` to append elements, reads the SVG dimensions for centering, and positions features with explicit x/y offsets and eye spacing constants.

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