Skip to main content
100%

Fork of React + D3 Viz Starter

✓ Published0🌍 Public
CCHANDU BHARGAVI
Last edited Mar 3, 2023
Created on Mar 3, 2023

This example displays a minimal blank SVG canvas with visible margins, created using React and D3 v6. It uses the `VizContainer` component to abstract the SVG and group elements, following a margin convention. The `showMargins` prop highlights the plotting area boundaries. The code loads React, ReactDOM, and D3 via CDN links and sets up dimensions and margin variables for a 960×500 viewport.

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