Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Zzhangweihua1
Last edited Oct 27, 2020
Created on Oct 25, 2020
Forked from HTML Starter

This example demonstrates how to construct a simple face using basic SVG shapes with D3.js. It creates a yellow circle as the head, positioned in the center of the canvas, and adds two black circles for eyes, placed symmetrically around the center. The code uses D3’s `select` and `append` APIs to manipulate the SVG elements, setting attributes like radius and fill directly. The rendering relies on D3 v6 through a bundled JavaScript file, with the SVG canvas defined at 960 by 500 pixels.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes