Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Viewing a saved revision (read-only)

54a1ac4c51a840baaf73e27729901497

Let's make a face with D3.js!

0 stars1🌍 Public
Ddbidwai
Last edited Nov 21, 2020
Created on Nov 21, 2020
Forked from React Starter

A smiling face built from basic SVG shapes shows how D3.js v5 can assemble a figure from primitives. The code uses `d3.select` to append a yellow circle for the head, black circles for eyes, and a mouth drawn with the `d3.arc` path generator using specified inner and outer radii plus start and end angles. Positioning relies on the SVG width and height attributes read from the DOM, with the mouth placed inside a transformed `<g>` group. The example demonstrates simple attribute chaining and coordinate math for a playful default output.

AI-generated description