Fork of React + D3 Viz Starter
✓ Published0🌍 Public
This example demonstrates a minimal React and D3.js visualization starter template. It shows a blank SVG canvas with a visible margin guide, using the margin convention to separate the outer chart area from an inner plotting region. The code loads React 16, ReactDOM, and D3 v6 via CDN links and defines a `VizContainer` component that abstracts the SVG group element and applies translations via `transform`. The template provides fixed dimensions of 960 by 500 pixels and uses a gray background rectangle to highlight the 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