Skip to main content
100%

ICE5

✓ Published2🌍 Public
Nneffer77
Last edited Mar 10, 2023
Created on Mar 3, 2023

A React and D3 v6 visualization renders an SVG image of a map with a red overlay, sourced from an embedded PNG data URI. The `VizContainer` component abstracts SVG and group elements following the margin convention, displaying margins via a `showMargins` prop. The code sets up a fixed 960x500 canvas with 30-pixel margins, using `ReactDOM.render` to mount the App component.

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