Skip to main content
100%

Smily with D3

✓ Published0🌍 Public
Ssunith-kumar
Last edited Dec 10, 2019
Created on Dec 10, 2019
Forked from Shapes with SVG

This example renders a yellow smiley face in an SVG canvas using D3 v5. It draws a large circle for the face, two smaller circles for the eyes, and a path for the mouth, all positioned relative to the SVG’s width and height via `d3.select` and `svg.append`. The code uses D3’s `arc` import and sets circle attributes like `r`, `cx`, and `cy` directly. The smiley is centered on a 960×500 canvas, with the mouth path’s shape defined but not fully illustrated in the provided snippet.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes