Skip to main content
100%

Read in JSON department files

✓ Published0🌍 Public
NNourAldinAlmubarak
Last edited Apr 7, 2020
Created on Apr 2, 2020

This example reads course and department data from two JSON files and displays a sunburst chart using D3 v5. It loads the files with `Promise.all` and `d3.json`, then partitions the hierarchical data with `d3.partition` and renders it as SVG arcs via `d3.arc`. The visualization shows department and course names as labeled, colored slices, with interactive transitions on click using `transition.attrTween` to smoothly update the layout. Rotation logic in `computeTextRotation` orients labels to avoid upside-down text.

AI-generated description
MIT Licensed

Similar vizzes