Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3_Nithish.js!

Public visualization

Viewing a saved revision (read-only)

6741a44cc44142a28aa95dbafc37c1cc

Let's make a face with D3_Nithish.js!

0 stars3🌍 Public
GGroup 17
Last edited Feb 23, 2023
Created on Feb 23, 2023

This example demonstrates fundamental DOM manipulation with D3.js by building an animated smiley face. The face consists of SVG shapes—a green circle head, two eyes, eyebrows, and a mouth created with the `d3.arc` path generator. The code uses `d3.select` and `d3.append` to construct the elements, and `transition` with a 2000-millisecond duration to make the eyebrows move up and down repeatedly. The rendering approach relies on D3 v5’s selection and transition methods on SVG elements, with the face centered using an SVG `transform` translate.

AI-generated description

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