Skip to main content
100%

Fork of React + D3 Viz Starter

✓ Published1🌍 Public
JJediquu
Last edited May 8, 2023
Created on May 8, 2023

A fork of the React + D3 Viz Starter demonstrates a reusable `VizContainer` React component that abstracts SVG and group elements using D3’s margin convention. The example renders a blank SVG with gray outer and inner rectangles to visualize the chart area and margins, which can be toggled via the `showMargins` prop. It uses React 16 and D3 v6, loaded via CDN, to structure the visualization, while the included `graph.json` file provides hierarchical data for future chart implementation.

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