Skip to main content
100%

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

✓ Published0🌍 Public
BBeihaiTianming
Last edited Feb 18, 2021
Created on Feb 18, 2021

A dynamic smiley face rendered in SVG responds to mouse movement by shifting its eyebrows. The example demonstrates fundamental D3.js DOM manipulation, using `d3.select` and `d3.event` to track the cursor and update the eyebrow positions through attribute changes. The face itself is constructed from basic SVG shapes—circles for the head and eyes, and paths for the mouth and eyebrows—all styled via a linked CSS file. The code relies on D3 v5 and runs entirely in the browser, 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