Skip to main content
100%

Let's make a facec with D3.js!

✓ Published1🌍 Public
AAnna Lopez
Last edited Apr 5, 2020
Created on Apr 5, 2020

This example builds a smiling cartoon face from basic SVG shapes using D3.js v5, with a yellow circle for the head, dark eyes, rectangles for eyebrows, and an arc-generated mouth. The code uses `d3.select` to target the SVG, `d3.arc()` to compute the mouth path, and chained `transition().duration()` calls to animate the eyebrows bobbing up and down. Rendered as static SVG with a 2000-millisecond looping eyebrow motion, it demonstrates declarative shape construction and simple tweened animation in a React-free HTML page.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes