Skip to main content
Public

Share visualization

Loading preview…

Fork of 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

Fork of Smiley Face Part IV

0
Cchar0496
Last edited Apr 13, 2022
Created on Apr 13, 2022

This example shows a yellow smiley face drawn with SVG shapes, centered on a 960×500 canvas. It uses React components to render a background circle, two eye circles, and a mouth arc generated with D3’s `arc()` function. The face is positioned using SVG transforms, with stroke width, eye offsets, and mouth radius defined as constants. The code combines React’s declarative JSX with D3’s geometry helpers, loading d3.v5 and React 16.9 from CDNs, and renders everything as static SVG without interaction or animation.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed