Skip to main content
Public

Share visualization

Loading preview…

Smiley Face Part II

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Smiley Face Part II

0
Yyyaaa1
Last edited Oct 2, 2019
Created on Oct 2, 2019

This example shows a simple smiley face rendered as an SVG graphic using React and D3. The face consists of a yellow circle with a black stroke, two black eye circles, and a mouth drawn as an arc using the `d3.arc()` API with inner and outer radii. React manages the component structure and JSX markup, while D3 provides the arc path generator for the mouth shape. The code uses explicit pixel coordinates and constants for positioning, with the entire graphic centered at the midpoint of the 960-by-500 viewport.

AI-generated description

Smiley face implementation with React & D3.

Comments

Sign in to join the discussion.

MIT Licensed