Fork of React + D3 Viz Starter
✓ Published0🌍 Public
This example demonstrates a blank React + D3 visualization starter template, displaying only the SVG container structure with visible margins highlighted in gray. The `VizContainer` component abstracts SVG and group elements following D3’s margin convention, rendering an outer and inner rectangle to visualize the layout. Built with React 16 and D3 v6, the code uses CDN-loaded libraries and a `showMargins` prop to toggle the rectangles, providing a clean foundation for adding custom 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