Skip to main content
Public

Share visualization

Loading preview…

Fork of Lets make a Smiley part 3: D3js and arcs in SVG

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 Lets make a Smiley part 3: D3js and arcs in SVG

0
Ssaijahnaviappineni
Last edited Jun 17, 2022
Created on Jun 17, 2022

This example renders a smiley face as an SVG graphic using D3.js v6 arcs and React. It draws a large circle for the face, two smaller circles for eyes, and a D3 arc path for the mouth, all positioned with SVG transforms. The code imports the `arc` function from D3 to generate the mouth’s path data with specified inner and outer radii and angular start and end points. The visualization is built with React’s `ReactDOM.render` and uses hardcoded dimensions, with a light blue background set via CSS.

AI-generated description

A bare minimum HTML page.

Comments

Sign in to join the discussion.

MIT Licensed