Skip to main content
100%

sunburst react

✓ Published1🌍 Public
MMark Lam
Last edited Jan 3, 2022
Created on Dec 29, 2021

This sunburst chart visualizes a hierarchical dataset of research topics, with each ring representing nested categories and slice sizes proportional to data values. The visualization is built with React and D3 v6, using `d3.partition` to compute the layout, `d3.hierarchy` to structure the data, and `d3.arc` to render the SVG paths. Animated tooltips display node names and publication dates on hover, while text labels are rotated to align with their corresponding slices. The data is loaded from a remote CSV file and processed into the hierarchy structure.

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