🌍 Public
Viewing a saved revision (read-only)
c7e420bbfe544283adc4fa3b6e16bcb7
Fork of React + D3 Viz Starter
This example demonstrates a React + D3 visualization starter template, displaying a blank SVG canvas with gray and light-gray rectangles that highlight the margin convention. The code loads remote JSON data via `d3.json` but does not yet render it, focusing instead on the boilerplate structure. A `VizContainer` component abstracts the SVG and group elements, using the margin convention to position inner content. The visualization relies on React 16 and D3 v6 loaded via CDN, with SVG rendering for the output.
AI-generated descriptionBoilerplate code for a React + D3 visualization with:
- CDN links for React, ReactDOM, and D3
- Basic React boilerplate
- Variables for dimensions and margins
- A
VizContainercomponent that:- Abstracts SVG/group container elements
- Follows the margin convention
- Show the margins, which can be easily removed by deleting the
showMargins={true} prop