Skip to main content
100%

D3 Intro Smiley Face

✓ Published0🌍 Public
LLuiz Domingues
Last edited May 14, 2022
Created on May 14, 2022

This example shows a simple smiley face drawn entirely with SVG shapes, centered in a 960×500 viewport. It demonstrates basic D3 selections, attribute manipulation, and SVG group transformations. The code appends a yellow circle for the face, then uses two nested groups to position eye circles and line paths with `translate` transforms, relying on D3’s `select` and `append` methods. Black strokes outline the face and eye details, while CSS hides page margins and overflow.

AI-generated description

D3 Intro Smiley Face HTML SVG, CSS, and JavaScript.

MIT Licensed

Similar vizzes