Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Ssourcebox-bug
Last edited Apr 15, 2019
Created on Apr 15, 2019

A smiling face built entirely with D3.js SVG elements animates its eyebrows upward and downward in a repeating loop. The example demonstrates fundamental DOM manipulation through D3 selections, appending circles for the face and eyes, rectangles for eyebrows, and an arc-generated path for the mouth. Using `d3.select`, `transition().duration()`, and the `arc()` generator, it shows how to bind data from a CSV file and apply chained transitions to transform SVG attributes. The face is centered via a group transform, with the population dataset loaded from `data.csv` though not visually mapped to the graphic.

AI-generated description

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

MIT Licensed

Similar vizzes