Fork of React + D3 Viz Starter
✓ Published0🌍 Public
This example demonstrates a minimal React + D3 visualization boilerplate. It renders a blank SVG canvas with a gray outer rectangle and a light gray inner rectangle to visualize the margin convention. The `VizContainer` component abstracts the SVG and group elements, using a translate transform based on the provided margin values. The setup uses React 16.13.1, ReactDOM, and D3 v6.2.0 loaded via CDN, with dimensions and margins defined as variables in the main `App` component. The `showMargins` prop controls whether the container rectangles are displayed.
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