Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Make a face - Pavani Mangungari

Public visualization

Viewing a saved revision (read-only)

1c429019436d4c539c70e6d336318606

Make a face - Pavani Mangungari

0 stars0🌍 Public
PPavaniMangugari
Last edited Jun 18, 2022
Created on Jun 18, 2022

This example demonstrates fundamental DOM manipulation with D3.js by constructing a smiley face out of SVG shapes. The code builds a face from basic elements: a large orange circle for the head, two eyes, eyebrows drawn with D3’s `arc()` function, a nose, and a mouth. Using D3’s `select` and `append` APIs, each feature is positioned relative to a central group, with the eyebrows placed atop the eyes to showcase how SVG paths can be crafted with parametric arc geometry. The rendering is pure SVG, with styling managed through a separate stylesheet.

AI-generated description

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