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
DDavid Sjoberg
Last edited Nov 23, 2019
Created on Nov 23, 2019

This example uses D3.js v5 to construct a smiley face from scratch, with interactive eyebrows that move. It demonstrates fundamental DOM manipulation by selecting an SVG element and appending shapes such as circles and paths via D3’s `select`, `append`, and attribute-setting methods. The code relies on the `d3.min.js` library loaded from a CDN and renders entirely in SVG. Simple CSS sets the page margin and hides overflow, while a bundled JavaScript file drives the facial features’ static and animated properties.

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