Skip to main content
100%

Fork of React + D3 Viz Starter

✓ Published0🌍 Public
PPradyumn-Patil
Last edited Apr 3, 2022
Created on Apr 3, 2022

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 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