Skip to main content
100%

Fork of Fork of Create a face with d3.js!

✓ Published0🌍 Public
Sshaiksajidali
Last edited Mar 16, 2024
Created on Mar 16, 2024

This example draws a simple cartoon face using D3.js and SVG primitives, rendered on a 960x500 canvas. It constructs a light blue circle for the head, two ellipses for eyes, rectangular eyebrows, and a red arc for a mouth, all positioned with grouped transformations. The illustration demonstrates D3’s selection and shape-creation methods, including `arc()` for the mouth path, and uses D3 v7 loaded via UNPKG. The code shows how to build a static scene with directly defined geometry and coordinates.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes