Skip to main content
100%

D3 Intro. Making a face.

✓ Published2🌍 Public
Rross-fisher
Last edited Oct 9, 2019
Created on Sep 24, 2019

This example builds a stylized face using D3.js’ DOM manipulation and SVG elements. It creates a yellow circle as the head, then adds eyes, eyebrows, and a mouth as separate SVG shapes—circles, rectangles, and a path generated with the `arc()` generator. All features are positioned relative to the SVG center using a `<g>` group with a translation transform. The code uses D3 v5 selections (`d3.select`, `append`, `attr`) to construct the scene entirely in code, with no external data source.

AI-generated description

Cars report

MIT Licensed

Similar vizzes