Skip to main content
100%

D3 Face

✓ Published2🌍 Public
YYoung Song
Last edited Jun 23, 2022
Created on Jun 16, 2022
Forked from D3 Starter

This example draws a cartoon face from SVG shapes. A yellow circle forms the head, two black circles serve as eyes, and a mouth is rendered as a dark arc using the `d3.arc()` helper. The coordinate positions and radii for the face, eyes, and mouth are calculated from the SVG’s width and height attributes. The code imports `select` and `arc` from D3 v7 and appends all elements to an SVG with an orange background.

AI-generated description
  • Loading d3.js
  • Importing d3 function using ES6
  • Creating a face using SVG and d3
MIT Licensed

Similar vizzes