Skip to main content
100%

Fork of React + D3 Viz Starter

✓ Published0🌍 Public
RRahulChaitu999
Last edited Jul 3, 2022
Created on Jul 3, 2022

This example demonstrates a minimal React and D3.js visualization starter template. It shows a blank SVG canvas with a visible margin guide, using the margin convention to separate the outer chart area from an inner plotting region. The code loads React 16, ReactDOM, and D3 v6 via CDN links and defines a `VizContainer` component that abstracts the SVG group element and applies translations via `transform`. The template provides fixed dimensions of 960 by 500 pixels and uses a gray background rectangle to highlight the plotting area.

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