Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's Make a Face with D3.js

Public visualization

Viewing a saved revision (read-only)

c0b56c0724364b9c985863684aeb34e3

Let's Make a Face with D3.js

1 star1🌍 Public
AAloysius
Last edited Feb 15, 2020
Created on Feb 15, 2020

This example creates a cartoon face with D3.js v5, featuring yellow circular head, eyes, eyebrows, and a mouth drawn using the `arc` generator. The eyebrows animate through chained `transition().duration()` calls on a group element, moving them downward and back. The SVG is centered using a translated `<g>` element, with dimensions set from attributes and shapes positioned via constants like `eyeSpacing` and `eyeRadius`. The code imports `select` and `arc` from D3, demonstrating basic SVG manipulation and animation in a React project.

AI-generated description

A bare minimum HTML page.

See also React Starter.