Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Vviolet-chaeyoonkim
Last edited Aug 8, 2019
Created on Aug 7, 2019

A yellow smiley face is drawn in an SVG using D3.js v5, with eyes, eyebrows, and a mouth created via `circle`, `rect`, and `path` elements. The face is centered using a translated group, and the mouth is generated with the `d3.arc` helper. Eyebrows are positioned as rectangles, while the code demonstrates fundamental DOM manipulation through selections and attribute chaining. The example relies on static shapes without interaction, showcasing basic SVG rendering with D3’s `select` and `append` methods.

AI-generated description

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

MIT Licensed

Similar vizzes