Skip to main content
100%

Let's make a face with D3.js

✓ Published9🌍 Public
Yyejichun@naver.com
Last edited Jul 25, 2021
Created on Jul 25, 2021

This example shows a simple cartoon face built with D3.js, featuring yellow circular head, black-outlined eyes, animated eyebrows, and a mouth created using the `d3.arc()` shape generator. The SVG elements are positioned using translations and attribute bindings, with the eyebrows transitioning through repeated `transition.attr` calls over two-second intervals. Code imports `select` and `arc` from D3 v7 via UNPKG, and demonstrates local ES6 module usage through an exported `message` constant. The face components are drawn entirely in SVG within a 960×500 viewport, with no external data source.

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