Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Let's make a face with D3.js!

0 stars0🌍 Public
VVarun Nangia
Last edited May 27, 2020
Created on May 27, 2020

A smiling face built with D3.js demonstrates basic SVG manipulation and animation. The code uses `d3.select` and `d3.append` to construct circles for the eyes, rectangles for the eyebrows, and a path created with `d3.arc` for the mouth. A chained `transition().duration(2000)` moves the eyebrow group up and down repeatedly. The example renders entirely in SVG, centered within a 960×500 viewport, with static yellow fill and black stroke styling. No external data is loaded; the face is generated purely from hard-coded dimensions and offsets.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed