Skip to main content
100%

Let's make a face with D3.js

✓ Published0🌍 Public
Sslt19933
Last edited Oct 16, 2020
Created on Oct 16, 2020

This example shows a simple smiley face drawn with D3.js v5, using SVG circles for the head and eyes and an arc-generated path for the mouth. The face is constructed with hardcoded dimensions and positions, including an eye spacing of 100 pixels and a mouth arc spanning from π/2 to 3π/2. The code imports `select` and `arc` from the D3 library, appends SVG elements to a 960×500 canvas, and uses the `arc` generator with inner and outer radii to create the mouth shape. No external data is loaded; the design is purely programmatic.

AI-generated description

A program that loads and parses some CSV data: CSS Named Colors.

MIT Licensed

Similar vizzes