Skip to main content
100%

Smiley Beginner D3

✓ Published2🌍 Public
ZZoe Ferencova
Last edited Mar 6, 2023
Created on Mar 6, 2023

This example displays a simple smiley face composed of SVG shapes: a yellow circle for the head, two small circles for eyes, and a curved arc for the mouth. Built with React and D3 v7, it uses the `arc()` generator to define the mouth’s path with specified inner and outer radii and angles. The head and eyes are drawn with React’s `<circle>` elements, while coordinates are calculated relative to the center of the 960×500 viewport. Rendering occurs via ReactDOM, with D3 loaded alongside React.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes