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
Jjonasveenhues
Last edited Apr 29, 2022
Created on Apr 29, 2022

This example is a React component that renders a classic smiley face using SVG. It shows a yellow circle with a black outline, two solid black eyes, and a curved mouth drawn as an arc. The code imports the `arc` function from d3 to create the mouth’s path, while React composes SVG elements like `<circle>` and `<path>`. The face is centered in a 960 by 500 viewport, with the background circle’s radius and stroke width defined in the component. D3 v5 handles the geometric arc, while React renders the static result without interaction.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed