Fork of React + D3 Viz Starter
✓ Published0🌍 Public
This example displays a minimal blank SVG canvas with visible margins, created using React and D3 v6. It uses the `VizContainer` component to abstract the SVG and group elements, following a margin convention. The `showMargins` prop highlights the plotting area boundaries. The code loads React, ReactDOM, and D3 via CDN links and sets up dimensions and margin variables for a 960×500 viewport.
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