Skip to main content
100%

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

✓ Published0🌍 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.

MIT Licensed

Similar vizzes