Skip to main content
100%

Fork of Let's make a face with D3.js!

✓ Published1🌍 Public
DDhiyan-jay
Last edited Jul 8, 2021
Created on Jul 8, 2021

A smiley face, drawn with D3.js v5, sits centered in an SVG canvas. The code constructs the face using SVG primitives: a yellow circle for the head, circles for the eyes, rectangles for the eyebrows, and a D3 arc path for the mouth. The eyebrows animate vertically in a repeating two-second cycle using chained `transition().duration()`. The example demonstrates fundamental DOM manipulation by selecting the SVG element and appending groups and shapes, with sizing and positioning handled through D3's `select` and `arc` APIs.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes