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
FfizzleRaider7645
Last edited Dec 27, 2019
Created on Dec 27, 2019

This example demonstrates how to build a simple smiley face using D3.js, with a yellow circle for the head, black circles for the eyes, and an arc for the mouth. The code uses D3’s `select` and `arc` APIs to create and position SVG elements, relying on the `attr` method to set coordinates and dimensions based on the SVG’s width and height. The face is rendered entirely in SVG, with no external data source, and serves as a basic introduction to DOM manipulation with D3.

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