Skip to main content
100%

Lets make a Face with D3.js

✓ Published2🌍 Public
Nnick-yadav
Last edited Aug 8, 2020
Created on Aug 8, 2020

This example constructs a simple cartoon face using D3.js v5 in an SVG-based React setup. It shows a yellow circle for the head, positioned at the center of a 960x500 SVG, with two smaller black circles for eyes offset horizontally and vertically. The code uses D3 selections and the `append` method with `attr` chaining to set geometric properties like `cx`, `cy`, and `r`. All shapes are rendered as static SVG elements without interaction or data binding.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes