Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
CCodeHandLuke
Last edited Aug 13, 2019
Created on Aug 13, 2019

A yellow SVG smiley face with black stroke is centered on a red background, drawn using D3.js v5 primitives like `circle`, `rect`, and `path`. Animate the face by applying a chained `transition().duration(2000)` to the eyebrows group, moving it vertically up and down. The mouth is formed with D3's `arc()` generator, specifying inner and outer radii and a start and end angle. The example demonstrates fundamental DOM selection and manipulation via `d3.select` and `svg.append`.

AI-generated description

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

MIT Licensed

Similar vizzes