Skip to main content
Public

Share visualization

Loading preview…

Smiley Face Part IV

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 IV

0
Ssriramvsharma
Last edited Oct 13, 2020
Created on Oct 13, 2020

This example renders a yellow smiley face as an SVG using React components and D3’s `arc` API for the mouth. The face is centered on a 960×500 canvas, with a background circle (yellow fill, black stroke), two eyes positioned via offset coordinates, and a mouth generated from an arc with inner and outer radii. All shapes are drawn declaratively in JSX, with React managing the component props for radius, stroke width, and offsets, while the `g` transform handles centering. The code defines fixed dimensions and styling rather than loading external data.

AI-generated description

Smiley face implementation with React & D3, using a React component.

Comments

Sign in to join the discussion.

MIT Licensed