Skip to main content
100%

Fork of React + D3 Viz Starter

✓ Published1🌍 Public
NNita
Last edited Feb 23, 2025
Created on Feb 23, 2025

A timeline chart displays dated events with circular markers, bold titles above and descriptions below a centered time axis. The example plots policy accomplishments using D3 v6 scales and axes, with React 16 components managing the SVG container and margin layout. Data flows from a static JavaScript array through `TimelineChart`, which calls the `Timeline` visualization function to render circles, labels, and the bottom axis via `d3.axisBottom`. A reusable `VizContainer` component wraps the SVG group, optionally showing margin guides via a `showMargins` prop.

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