Skip to main content
100%

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

✓ Published0🌍 Public
IIndhuKrishnaraj
Last edited Mar 2, 2023
Created on Mar 2, 2023

This example demonstrates fundamental DOM manipulation with D3.js by rendering a yellow smiley face whose eyebrows animate upward and downward. The face is built entirely with SVG shapes—circles for the eyes and face, rectangles for eyebrows, and a path using `d3.arc()` for the mouth. The animation is driven by chained `transition().duration()` calls on the eyebrow group, moving it vertically between two offsets. D3’s `select` and `attr` methods position all elements relative to the SVG’s center, with no external data source.

AI-generated description

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

MIT Licensed

Similar vizzes