Skip to main content
100%

D3.js

✓ Published0🌍 Public
Aalihakan34
Last edited Jul 4, 2019
Created on Jul 4, 2019

This example uses D3.js version 5 to draw a simple yellow face with black outlines on an SVG canvas. It demonstrates basic SVG shape creation by appending a large circle for the face, two smaller circles for eyes, and an arc path for a mouth, all transformed to center within a 960×500 viewport. The code highlights direct manipulation of SVG attributes like `r`, `cx`, `cy`, and `fill`, and constructs the mouth using an arc generator with specified inner and outer radii and angular ranges.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes