Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Intro Smiley Face

Public visualization

D3 Intro Smiley Face

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed