Skip to main content
100%

Viz tutorial 1

✓ Published1🌍 Public
JJulien Tremblay
Last edited Oct 18, 2024
Created on Oct 16, 2024

This example displays a grid of randomly generated smiley faces, each with varied dimensions for features like eyes, mouth, and stroke width, alongside a randomly selected background color. Built with React and D3 v7, it renders faces as SVG components, using D3’s `arc` for the mouth path and `rgb` for color generation. The code maps over an array from `d3.range` to produce 25 distinct faces, demonstrating reusable component composition and dynamic styling.

AI-generated description

Smiley face I to III

MIT Licensed

Similar vizzes