Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of React + D3 Viz Starter

Public visualization

Viewing a saved revision (read-only)

ded486d3b3424a9890376491a61ebb0e

Fork of React + D3 Viz Starter

0 stars0🌍 Public
Oobasilakis
Last edited Feb 19, 2022
Created on Feb 19, 2022

This starter example renders an empty SVG canvas with configurable margins using React and D3. The `Explosion` component creates an SVG group element translated by fixed margin values, while `showMargins` toggles visual guides for layout debugging. It imports React and ReactDOM from CDN links, along with D3 v6.2.0, and draws no data-driven shapes—serving purely as a boilerplate foundation for React-based D3 visualizations.

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