Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Lets make a Smiley part 3: D3js and arcs in SVG

Public visualization

Lets make a Smiley part 3: D3js and arcs in SVG

1 star2🌍 Public
Jjanmakar1
Last edited Aug 27, 2020
Created on Aug 27, 2020

This example renders a smiley face using D3.js and React, with SVG elements composed from circles and an arc-based mouth. It demonstrates the D3 `arc()` generator to create a thick, crescent-shaped mouth by specifying inner and outer radii along with start and end angles. The face is drawn with a navajowhite circle for the head, black stroke for the outline, and two smaller circles for eyes, all positioned via SVG transforms and centered coordinates. The code uses React for the component structure and D3 v6 for arc generation, rendering entirely through SVG within a light blue background.

AI-generated description

A bare minimum HTML page.

Comments

Sign in to join the discussion.

MIT Licensed