Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 and SVG smile

Public visualization

Viewing a saved revision (read-only)

54cde6f60f7944c2a8b58411bdd939d7

D3 and SVG smile

0 stars0🌍 Public
EElena Dreosti
Last edited Sep 30, 2020
Created on Sep 30, 2020
Forked from D3 and SVG smile

This example shows a simple smiling face constructed entirely with SVG shapes, drawn on a red background. The face consists of a yellow circle for the head, two small rectangles for eyes, two circles for pupils, and a black arc for the mouth. The code uses D3 version 6 to select the SVG element, set its dimensions and background, and append the geometric primitives with chained `.attr()` calls. It also uses `d3.arc()` to generate the path data for the smile, demonstrating how D3’s arc generator can be used with SVG paths.

AI-generated description

A bare minimum HTML page.

See also React Starter.