Skip to main content
100%

D3 Random Abstract Art

✓ Published0🌍 Public
CCaroline Ghisolfi
Last edited Jan 2, 2023
Created on Dec 31, 2022
Forked from Javascript A6

This example generates a grid of 100 colored rectangles whose fills use randomized pairs from the d3 `schemeCategory10` palette via `d3.scaleLinear`. As the mouse hovers over a square, that rectangle and its entire row are re-appended to the SVG to bring them to the foreground, while the square’s width and height are scaled up or down by a factor of three or four. Clicking anywhere reloads the page to generate a fresh random composition. The visualization is built with D3 v6 selections and SVG rendering, and includes a small instruction bar.

AI-generated description

JS Basics

MIT Licensed

Similar vizzes