Skip to main content
100%

Lets make a face

✓ Published0🌍 Public
Ppvhch
Last edited Jul 19, 2019
Created on Jul 19, 2019
Forked from Lets make a face

A simple face is drawn entirely with SVG shapes in a 960-by-500 viewport, using a yellow circle for the head, two black circles for eyes, and a path generated by `d3.arc()` for the mouth. The code selects the SVG element with `d3.select` and sets each shape’s attributes—`r`, `cx`, `cy`, `fill`, and `stroke`—explicitly. The mouth is positioned relative to a `<g>` group translated to (250,200), and the arc spans from angle 0 to π. This example demonstrates basic SVG rendering with static D3 v5 selections, without data binding or interaction.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes