Fork of React + D3 Viz Starter
✓ Published0🌍 Public
This visualization demonstrates a blank SVG canvas with visible margin boundaries, ready for React and D3.js content. The `VizContainer` component abstracts the SVG and group elements, following the standard margin convention by translating the inner group. The code uses `ReactDOM.render` to mount the app, and shows the outer and inner rectangles as gray and light gray fills when `showMargins` is true. The example uses CDN-loaded React, ReactDOM, and D3 v6 libraries, with dimensions and margins defined as variables.
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
MIT Licensed