Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Let's make a face with D3.js!

Public visualization

Viewing a saved revision (read-only)

66178adeabe64cb0ad222d51ca80c471

Fork of Fork of Let's make a face with D3.js!

0 stars0🌍 Public
Aakhilgupta11
Last edited Feb 23, 2023
Created on Feb 23, 2023

This example demonstrates how to construct a smiley face using fundamental D3.js v5 DOM manipulation with SVG elements. The code builds a red circular head with eyes, a nose, ears, eyebrows, a mouth, and teeth through individual shape selections using `d3.select` and SVG attribute chaining. It uses the `d3.arc` generator to create the nose and mouth paths, while static SVG elements like circles and rectangles are positioned manually. The face is centered via a group transform, and the eyebrows are rotated to give the face an expressive, animated look.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.