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
MMuhammadAtifHussain
Last edited Nov 6, 2021
Created on Nov 6, 2021

This example shows a smiley face built with D3.js, featuring a yellow circle head, two eyes, and an arc-based mouth. The eyebrows, rendered as rectangles, animate upward and then back down in a looping motion using chained `transition()` calls with a two-second duration each. The code leverages D3 v5’s `select`, `arc`, and `transition` APIs to manipulate SVG elements, positioning the face components relative to the center of an 960×500 SVG canvas. It demonstrates fundamental DOM manipulation and data-driven animation without external data sources.

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