Skip to main content
100%

Fork of D3.js 教程

✓ Published0🌍 Public
Hhchen156@jh.edu
Last edited Mar 22, 2024
Created on Mar 22, 2024
Forked from D3.js 教程

This example shows a grid of 20 colored rectangles laid out on an SVG canvas, with each rectangle’s fill color cycling through a palette of six distinct hues. The visualization is generated using D3.js v6, where `d3.range` creates the dataset and `selectAll` with `.join` binds it to SVG `<rect>` elements. The layout positions rectangles in rows and columns based on a computed column count, while the background is set via CSS. The code runs in a browser, adapting the chart size to half the window width and full height, and demonstrates basic data binding and SVG rendering without external data sources.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes