Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Smiley face with D3

Public visualization

Smiley face with D3

0 stars0🌍 Public
LLevi
Last edited Jan 28, 2020
Created on Jan 28, 2020
Forked from HTML Starter

This example shows a classic smiley face drawn as a yellow circle with black eyes and a curved mouth on a transparent SVG canvas. The code uses D3 v5’s `select`, `append`, and `attr` methods to create SVG circles for the face and eyes, while the smile is rendered as a path generated by the `arc` generator with specified inner and outer radii and start/end angles. The face is centered within a 960×500 SVG element, and eye spacing and offset are controlled by numeric variables. No external data is loaded; all shapes are procedurally generated.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed