Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Jjbrauckman
Last edited Nov 7, 2019
Created on Nov 7, 2019

This example uses D3.js v5 to construct a simple cartoon face entirely from SVG shapes. It draws a yellow circle for the head and two black circles for eyes, with positions calculated relative to the SVG’s width and height. The code imports `select` and `arc` from D3, though only `select` is used to append and style the elements. Eye spacing and vertical offset are defined as constants, demonstrating how D3’s attribute chaining builds static visuals with minimal data.

AI-generated description
MIT Licensed

Similar vizzes