Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

black smile

Public visualization

Viewing a saved revision (read-only)

6826865aea8046abb7f17bef2e7b51d2

black smile

0 stars0🌍 Public
Ssaikrishnareddymandala
Last edited Feb 20, 2022
Created on Feb 20, 2022

This example displays a large smiley face in a black-and-white gradient, with khaki-colored eyes and a curved mouth, centered on an SVG canvas. The face’s fill and stroke use two linear gradients defined in SVG `defs`, while the mouth is drawn using a D3 `arc` generator with specified inner and outer radii. The component is built with React, rendered via `ReactDOM.render`, and computes all positions and dimensions as JavaScript constants. The chart demonstrates integrating D3’s shape utilities, such as `arc`, within a React-rendered SVG hierarchy.

AI-generated description

Making a smiley face with React and D3