Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Lleothimoteo
Last edited Sep 13, 2020
Created on Sep 13, 2020

This example demonstrates fundamental DOM manipulation with D3.js by building a smiley face whose interactive eyebrows respond to user input. Clicking the button generates a random sequence of letters, which triggers a redraw using D3’s data join pattern (`d3.select` and `.enter()`). The code uses `d3.v5` to append styled `div` elements inside a target container, while the face itself is rendered as an SVG. The animation and face elements are driven by the bundled `bundle.js` script, showcasing basic selection, data binding, and dynamic updates.

AI-generated description

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

MIT Licensed

Similar vizzes