Fork of React + D3 Viz Starter
✓ Published0🌍 Public
This example demonstrates a minimal React and D3 visualization starter, displaying a blank SVG canvas with clearly outlined margin areas. The code uses React 16.13.1 and D3 v6, loaded via CDN, to construct a `VizContainer` component that abstracts SVG group elements following the margin convention. The container renders gray outer and inner rectangles to visualize the chart area, with the margins toggleable via a `showMargins` prop. The visualization itself contains no data or marks, serving purely as a foundation for building future charts.
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