Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Let's make a face with D3.js!

0 stars1🌍 Public
Wwen787
Last edited Jun 25, 2019
Created on Jun 25, 2019

A smiley face rendered in SVG responds to mouse movement by shifting its eyebrows, demonstrating fundamental DOM manipulation with D3.js. The example uses D3 v5’s `select` method to target the SVG element and the `arc` generator to draw the face’s curved features, such as the mouth. The visualization shows how D3 binds data to existing DOM nodes without requiring `.enter()` or `.append()`, focusing instead on updating attributes in response to user interaction. The face is built entirely through SVG shapes, with styling handled by an external CSS file.

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