Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Viz tutorial 1

Public visualization

Viewing a saved revision (read-only)

8e9520356a62499298ef99b920bb793b

Viz tutorial 1

0 stars1🌍 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