Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Let's make a face with D3.js!

Public visualization

Fork of Let's make a face with D3.js!

0 stars0🌍 Public
Kkamleshkr01
Last edited Oct 3, 2023
Created on Oct 3, 2023

This example animates a stylized smiley face drawn with D3.js, showing its eyebrows moving up and down in a looping motion. The face is composed of SVG shapes: a yellow circle for the head, two small circles for eyes, rectangles for eyebrows, and an arc-generated path for the mouth. The code uses D3’s `select` to access the SVG, `arc` to define the mouth, and chained `transition().duration()` calls to animate the eyebrow group’s vertical position. All elements are centered using a translated `<g>` 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