Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Wwoznicak
Last edited Aug 8, 2020
Created on Aug 8, 2020

A smiling face rendered in SVG is built from scratch using D3.js, with a yellow circle for the head, two eyes, a mouth arc, and rectangular eyebrows. The eyebrows animate upward and back down using chained `transition` calls with `duration` settings. The code uses `d3.select` to manipulate SVG elements and `d3.arc` to generate the mouth path, while all positions are computed from the SVG’s width and height attributes.

AI-generated description

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

MIT Licensed

Similar vizzes