Skip to main content
100%

let's make face with d3.js

✓ Published0🌍 Public
JJoora Song
Last edited Nov 25, 2021
Created on Nov 25, 2021

This example draws a smiling face on an SVG canvas using D3.js version 7. The code creates a yellow circle for the head, two circles for eyes, rectangles for eyebrows, and a path arc for the mouth, all positioned using absolute coordinates within a 960×500 viewport. It uses D3’s `select`, `append`, and `attr` methods to build and style the SVG elements, and the `arc` generator to define the mouth’s curved shape. The rendering is entirely vector-based, with no external data source.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes