Skip to main content
Public

Share visualization

Loading preview…

Frown 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

Frown Face Part II

1
Nnatsgeorge.ng@gmail.com
Last edited Jun 26, 2024
Created on Jun 26, 2024

This example shows a frown face built with React and D3, rendered as SVG. The face uses a red circle for the head, black circles for eyes, and a mouth path generated by D3’s `arc` function with adjusted start and end angles to create a downward curve. The code imports `arc` from `d3-shape` and uses `ReactDOM.render` to mount the SVG inside a React component. All dimensions are computed from fixed variables for width, height, and offsets, with the mouth positioned via a translation and the arc’s inner and outer radii controlling its thickness.

AI-generated description

Smiley face implementation with React.

Comments

Sign in to join the discussion.

MIT Licensed