Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Vvinothsm
Last edited Sep 8, 2019
Created on Sep 8, 2019

This example creates a yellow smiley face in an SVG canvas using D3.js, with two eyes and black rectangular eyebrows that appear above them. The face is centered by translating a group element, and all facial features are appended as SVG circles and rects. The code uses d3.select, attr, and append methods to build the static face, while the eyebrows are positioned with fixed dimensions and offsets, though the code does not animate them despite the README’s mention of movement. The visualization demonstrates fundamental DOM manipulation with D3’s declarative data-joining style.

AI-generated description

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

MIT Licensed

Similar vizzes