Skip to main content
100%

Lets make a face with D3.js

✓ Published0🌍 Public
NNita
Last edited Nov 9, 2018
Created on Aug 23, 2018
Forked from HTML Cars Report

This example uses D3.js v5 to assemble a cartoon face from primitive SVG shapes. A yellow circle forms the head, while black and pink circles, positioned by data-driven coordinates, create the eyes with a scaling animation triggered by chained `transition().delay()` calls. Eyebrows are drawn as rectangles from the same dataset, and an arc path, generated with `d3.arc()`, forms the mouth. The code demonstrates SVG manipulation and animation through D3’s selection and transition APIs, with the entire composition centered and scaled within a 960 by 500 viewport.

AI-generated description
MIT Licensed

Similar vizzes