Skip to main content
100%

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

✓ Published0🌍 Public
KKonstantinos Kotsiaridis
Last edited Jan 8, 2024
Created on Jan 8, 2024

This example demonstrates fundamental DOM manipulation with D3.js by rendering a yellow smiley face in SVG. The face includes two eyes, a mouth drawn using the `d3.arc` path generator, and rectangular eyebrows that animate vertically via chained `transition` calls with a 2-second duration each. The animation toggles the eyebrows up and down repeatedly, showing how D3’s selection methods and attribute updates, such as `attr` and `transition`, modify SVG elements over time. The code uses D3 v5 and imports `select` and `arc` from the library.

AI-generated description

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

MIT Licensed

Similar vizzes