Skip to main content
100%

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

✓ Published0🌍 Public
VVishakha Routra
Last edited Jan 30, 2026
Created on Jan 30, 2026

This example builds a smiling yellow face using D3.js v5, drawing the head, eyes, and mouth as SVG shapes positioned with a centered group transform. The code uses `d3.select`, `d3.arc` for the mouth path, and property setters like `attr` for circles and rectangles. A chained `transition` with a 2-second duration animates the eyebrows upward and back down, creating a repeated eyebrow-raising motion. The face is rendered entirely with SVG elements, with no external data source, and uses a fixed 960×500 viewport.

AI-generated description
MIT Licensed

Similar vizzes