Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of React & D3 Starter

Public visualization

Viewing a saved revision (read-only)

4c56577e76924ccfbb87fb503cee8130

Fork of React & D3 Starter

0 stars1🌍 Public
IIshika
Last edited Mar 8, 2026
Created on Jan 30, 2026
Forked from React & D3 Starter

This example draws a simple smiling face using D3.js. It shows a yellow circle as the face, with two smaller black circles for eyes and a curved path for the mouth. The visualization is built by appending SVG elements to the document body using D3's `d3.select` and `.append` methods, setting attributes like `cx`, `cy`, and `r` to position the shapes. The code hardcodes the face elements and also demonstrates a data-driven approach for the eyes using an array and D3's `.data()` method.

AI-generated description