Skip to main content
100%

Let's make a face with D3 new

✓ Published0🌍 Public
Mmirna981
Last edited Oct 8, 2019
Created on Oct 8, 2019

This example displays a cheerful cartoon face constructed from SVG primitives: a yellow circle for the head, two smaller circles for eyes, a rectangle for an eyebrow, and an arc-based path for the mouth. Built with D3 v5, the code uses `select` to target the SVG element and `attr` to position shapes, while the `arc` generator computes the mouth’s path geometry. The face is centered via a translated group, and all elements are drawn directly to the SVG canvas with fixed dimensions.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes