Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Viewing a saved revision (read-only)

6f38824107c747ec8ee66e0c3051785b

Let's make a face with D3.js!

0 stars0🌍 Public
Kkavi-kumaran
Last edited Dec 31, 2019
Created on Dec 31, 2019

This example demonstrates basic DOM manipulation with D3.js by constructing a smiling face from SVG primitives and animating its eyebrows. A yellow circle forms the head, with two smaller circles for eyes, a path generated with `d3.arc()` creating the mouth, and two rectangles serving as eyebrows. The animation uses `transition().duration(2000)` to sequentially move each eyebrow vertically, creating a winking effect. The face is centered using a `transform` translation, and the rendered output is SVG.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.