Skip to main content
100%

Lets make a face with D3.js

✓ Published0🌍 Public
Llamiyaa
Last edited Oct 6, 2019
Created on Oct 6, 2019

A yellow circle forms a face with black eyes, rectangular eyebrows, and a semicircular arc mouth rendered as SVG shapes. The right eyebrow animates between two vertical positions using `transition().duration()`, while the mouth uses the `arc()` generator from d3-shape with specified inner and outer radii. The code imports `select` and `arc` from D3 v5, appends elements to an SVG canvas sized 960 by 500, and centers the face using fixed pixel coordinates. No external data is loaded; all shapes are directly defined in the script.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes