Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

Viewing a saved revision (read-only)

8d98d805d4d14c80a7ffed54af37a50e

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

0 stars0🌍 Public
MMinaSSaleh
Last edited Feb 21, 2021
Created on Feb 21, 2021

This example demonstrates how to build a simple smiley face in an SVG canvas using D3.js v5. It shows fundamental DOM manipulation by appending circles for the face and eyes, positioning them with attributes like `cx` and `cy`. The code uses `d3.select` to target the SVG element and `append` to create shapes, while also setting styles like fill colors. The face is static, with no interactive or animated elements, and the data is hardcoded rather than loaded from an external source.

AI-generated description

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