Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
LLucian-jw
Last edited Jul 2, 2019
Created on Jul 2, 2019

This example demonstrates how D3.js can create and animate a smiley face using basic SVG shapes. The yellow circle head, eyes, eyebrows, and arc-based mouth are all built through direct DOM manipulation with `d3.select` and `.append`. The eyebrows are animated using chained `transition().duration()` calls, moving them up and down over two-second intervals. The code imports `select` and `arc` from the D3 library and relies on SVG attributes like `r`, `cx`, and `d` for rendering.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes