Fork of React + D3 Viz Starter
✓ Published0🌍 Public
This example demonstrates a minimal React + D3 starter template that renders an empty SVG visualization with visible margin areas. The code uses CDN-loaded React 16, ReactDOM, and d3.v6 to construct a reusable `VizContainer` component that abstracts SVG group elements and follows the standard margin convention. It passes explicit `width`, `height`, and `margin` props to draw light-gray outer and inner rectangles, which can be hidden by removing the `showMargins` prop. The visualization currently shows only the container scaffolding, ready for D3 visual elements.
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