Skip to main content
100%

Fork of React + D3 Viz Starter

✓ Published0🌍 Public
MMarcus
Last edited Sep 16, 2021
Created on Sep 16, 2021

This starter template demonstrates a blank React and D3 visualization scaffold with a gray SVG canvas and visible margin guides. The code uses React 16.13.1 for component rendering and D3 v6 for future data-binding utilities. A reusable `VizContainer` component abstracts the SVG group element and follows the margin convention, accepting props for dimensions and spacing. Running through the `ReactDOM.render` call, it loads libraries from CDN and displays only the container structure without any actual data or chart marks.

AI-generated description

Boilerplate code for a React + D3 visualization with:

  • CDN links for React, ReactDOM, and D3
  • Basic React boilerplate
  • Variables for dimensions and margins
  • A VizContainer component 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

Similar vizzes