Skip to main content
100%

Lets make a face

✓ Published0🌍 Public
DDaniel Piqué
Last edited Nov 23, 2018
Created on Nov 23, 2018

This example shows a yellow circle face created with SVG, built using D3 v5 selection and attribute methods. The code appends circles to an SVG canvas, setting radius, position, fill color, and stroke properties directly through `.attr()`. It uses `d3.select` to target the SVG and reads its width and height attributes to center the face. The partially completed code includes a commented placeholder for a left eye, and the page loads D3 from a CDN with a separate stylesheet that hides overflow.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes