Fork of React + D3 Viz Starter
✓ Published0🌍 Public
This visualization gallery example presents a blank React and D3 starter template. It demonstrates a reusable `VizContainer` component that abstracts SVG and group elements, following the standard margin convention. The component accepts width, height, and margin properties, and can optionally display margin rectangles for debugging. The code uses `ReactDOM.render` to mount the app and defines a 960x500 SVG canvas with 30-pixel margins, rendering the container with a gray outer rectangle and lighter inner plotting area.
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