Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Read in JSON department files

Public visualization

Read in JSON department files

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed