🌍 Public
Viewing a saved revision (read-only)
f94cc3d8b13c47f29d16a7d375060742
Fork this for D3 Setup
This example demonstrates a minimal D3.js setup within an HTML page, where circles, groups, and rectangles respond to interactions and data binding. It shows how to use D3 v7 selections to manipulate SVG attributes, such as toggling circle fill colors on click and generating random radii. The code uses `d3.selectAll`, `attr`, `style`, and the data join pattern with `join('rect')` to render pink rectangles from a static array. Text labels are appended to group elements, and the page relies on the d3-selection-multi plugin for the `attrs` method.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.