Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

Viewing a saved revision (read-only)

3d51d509f76244d09d1a6d31063f1391

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

0 stars0🌍 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.