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
Hhpies
Last edited Nov 21, 2019
Created on Nov 21, 2019

A yellow smiley face rendered in SVG is centered on a 960x500 canvas, with facial features constructed from D3.js geometric primitives: circles for the eyes, rectangles for the eyebrows, and a path using the `d3.arc` builder for the mouth. The eyebrows initiate a two-stage `transition` lasting 2000 milliseconds each, moving them upward and then back to their original position. The code employs `select` from D3 v5 and relies on attribute manipulation to position elements via `translate` transforms, demonstrating fundamental DOM creation and animation without external data.

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