Skip to main content
100%

Fork of sunburst react

✓ Published0🌍 Public
MMark Lam
Last edited Jan 4, 2022
Created on Jan 3, 2022
Forked from sunburst react

This sunburst visualization displays hierarchical data from a CSV file containing publication metadata, showing the relationship between publication years, predicate types, and PMIDs. The visualization uses D3's partition layout and arc generator to create the radial layout, with slices colored according to the d3.scaleOrdinal color scale using schemeTableau10. React manages the component lifecycle through useEffect and useRef hooks, while D3 handles the SVG rendering of paths and labels, with a tooltip appearing on mouseover events to display additional date information.

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