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
Ppizzaonline
Last edited Jun 8, 2020
Created on Jun 8, 2020

This example demonstrates fundamental D3.js DOM manipulation by building an animated smiley face with moving eyebrows. It renders an SVG scene with a yellow circular head, eyes, and a mouth created using the `d3.arc` path generator. The eyebrows are rectangles that animate upward and downward via chained `transition.attr` calls, moving over two seconds each way. The code uses D3 v5 selections and attributes to construct and position all elements relative to a centered group.

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