Skip to main content
100%

D3 - Smile

✓ Published1🌍 Public
MMikaela Cashman
Last edited Jul 29, 2022
Created on Jul 22, 2022
Forked from HTML Starter

This example renders a simple smiley face using React components and D3’s `arc` API to generate the mouth path. The SVG scene shows a pink background circle, two black eyes positioned with offsets, and a semicircular mouth drawn on a 960×500 canvas. The code imports `React`, `ReactDOM`, and `arc` from D3 v7, while React 16 handles the component tree. No data source is used; the visualization is entirely programmatic, with D3 only computing the arc shape and React managing the SVG elements and styling.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes