Skip to main content
100%

Fork of React + D3 Viz Starter

✓ Published0🌍 Public
TTrevor McReynolds
Last edited Jan 3, 2022
Created on Jan 3, 2022

This starter project provides a blank React application configured with the D3.js v6 library, rendering its output as an SVG graphic. The core `VizContainer` component abstracts the SVG and group elements, incorporating a configurable margin convention. By passing the `showMargins={true}` prop, users can visualize the outer plot area and inner data region as grey and light-grey rectangles, respectively, helping to clarify the drawing space during development. The setup relies on ReactDOM to render the root component.

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