Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Device1

Public visualization

Device1

0 stars0🌍 Public
MMorris Muriithi
Last edited Aug 4, 2024
Created on Aug 4, 2024

A yellow smiley face with animated eyebrows is rendered in an SVG using D3.js v5. The face includes two eyes, a curved mouth, and rectangular eyebrows, all drawn with basic SVG shapes and manipulated via D3 selections. The eyebrows transition vertically in a repeating two-second cycle using chained `transition().duration()` calls. The code imports `select` and `arc` from D3, using `arc` to generate the mouth path, and applies transforms to position elements relative to the SVG center.

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