🌍 Public
Viewing a saved revision (read-only)
f755c1beff49445daa9b5bf47fa9d775
Fork of React + D3 Viz Starter
This is a React and D3 starter template showing an empty SVG visualization area with visible margin guides. It demonstrates the margin convention pattern, where a `VizContainer` React component abstracts the SVG and group elements, rendering gray outer and inner rectangles to display the layout boundaries. The code uses React 16 and D3 v6 loaded via CDN, with the `showMargins` prop controlling visibility of the margin indicators. The example provides a reusable foundation for building custom charts with React components and D3's data manipulation capabilities.
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