Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

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

0 stars0🌍 Public
YYan Yan
Last edited Jan 17, 2023
Created on Jan 17, 2023

This example demonstrates fundamental DOM manipulation with D3.js by rendering a smiley face whose eyebrows move. The face is drawn as SVG elements, and the eyebrows are animated using D3’s `transition.attrTween` to shift their vertical position. The code uses `d3.select` and `d3.append` to build the shapes, while `d3.interval` drives the continuous motion. The page loads D3 v5 from a CDN and applies styling from an external stylesheet, with all script logic contained in `bundle.js`.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed