Skip to main content
100%

Fork of React + D3 Viz Starter

✓ Published0🌍 Public
SSoorena
Last edited Aug 26, 2021
Created on Aug 26, 2021

This example demonstrates a minimal React and D3.js visualization scaffold. It shows a blank SVG canvas with visible gray margins that delineate the plotting area from the outer drawing space. The `VizContainer` component abstracts SVG and group elements, applying the standard margin convention. The code uses React's component model and D3 v6 via CDN links, with a `showMargins` prop that toggles the display of boundary rectangles for development purposes.

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