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
CCristian Tovar
Last edited Aug 29, 2020
Created on Aug 29, 2020

A smiley face built entirely with D3.js demonstrates fundamental DOM manipulation and animation. The code uses D3 selections to append and style SVG shapes including circles for the head and eyes, rectangles for the eyebrows, and a path generated with the d3.arc function for the mouth. The eyebrows animate upward and downward via chained transition().duration() calls, shifting their containing group’s transform attribute over four seconds. The example relies on D3 v5, loaded from a CDN, and renders in an SVG canvas 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