Skip to main content
100%

D3 and SVG smile

✓ Published1🌍 Public
GGattu-Abhinay
Last edited Oct 1, 2020
Created on Sep 29, 2020
Forked from HTML Starter

This example shows a smiling face built with SVG shapes and animated with D3 transitions. A red background frames a yellow circle with a black stroke, while two small circles form the eyes and an arc path creates the mouth. The eyebrows are rectangles that move up and down using chained `transition()` calls with 500-millisecond durations. The code selects the SVG element with `d3.select`, sets its dimensions and background, and uses `d3.arc()` to generate the smile path, all within a React-compatible setup using D3 v6.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes