Skip to main content
100%

D3 first try

✓ Published0🌍 Public
JJack Wu
Last edited Feb 15, 2021
Created on Feb 15, 2021

This example demonstrates basic SVG drawing with D3, showing a yellow smiley face composed of a circle, two blue eye circles, and an arc-shaped mouth. The code uses D3 v6’s `select` and `arc` utilities, appending SVG elements within a centered group. Coordinates and dimensions come directly from the SVG’s width and height attributes, with the face centered at 960×500. The arc generator creates the mouth by specifying inner and outer radii and angular ranges. No data loading or interaction occurs; it solely illustrates static SVG shape construction.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes