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
JJayesh Swami
Last edited Aug 30, 2019
Created on Aug 30, 2019

This example demonstrates fundamental DOM manipulation with D3.js by building a smiling face out of SVG shapes, then animating its eyebrows. A yellow circle forms the head, with two dark eyes and an arc-based mouth positioned around the center. The code uses `d3.select`, `append`, and attribute setters to construct elements, while `transition().duration()` moves the eyebrow group up and down over two-second intervals. The rendering relies on SVG elements within a 960-by-500 viewport, with all positioning handled through transform attributes and numerical constants.

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