Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Kkitpes666
Last edited Jul 18, 2019
Created on Jul 18, 2019

A smiley face rendered in SVG demonstrates fundamental D3.js DOM manipulation. The face uses D3 selections to append a yellow circle, eyes, and a mouth via the `arc()` shape generator. With `transition().duration()`, the eyebrows animate upward and back, moving a group containing two rectangles. The code imports `select` and `arc` from the d3 module, targeting an SVG element sized through its attributes. Data is hardcoded as numeric constants for geometry, with no external dataset.

AI-generated description

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

MIT Licensed

Similar vizzes