Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
PPavelSHE
Last edited Nov 24, 2019
Created on Nov 24, 2019

A smiley face is drawn with SVG shapes, including a yellow circle head, black eyes, and an arc-based mouth. The example demonstrates fundamental D3.js DOM manipulation by selecting the SVG element, appending a group, and building each facial feature with `select`, `append`, and attribute setters. The left eyebrow is a rectangle that animates up and down using chained `transition().duration()` calls with 2000-millisecond delays. The mouth is generated with the `d3.arc` shape generator, using specified inner and outer radii and angular ranges.

AI-generated description

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

MIT Licensed

Similar vizzes