Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

SVG Example

Public visualization

SVG Example

0 stars0🌍 Public
TThomas Nield
Last edited Nov 24, 2019
Created on Nov 24, 2019
Forked from SVG Example

This example draws a smiling face in SVG using D3 v5, with a yellow circular head, two eyes, rectangular eyebrows, and an arc-shaped mouth. The eyebrows animate by moving vertically over two seconds using chained `transition()` calls, shifting down then back up. The code uses `d3.select`, the `arc()` generator from D3’s shape module, and attribute setters like `.attr()` to construct the SVG elements. Static properties for spacing and sizing are defined as variables, and the entire face is centered within a 960×500 viewport.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed