Skip to main content
100%

ICE - 7 Pie

✓ Published0🌍 Public
VVenkata Sai Preetham
Last edited Jul 3, 2022
Created on Jul 3, 2022

This visualization displays the top 10 cricketers by career runs as an interactive pie chart built with D3 v5. The chart breaks down each player’s total runs into proportional slices, with a legend listing player names and their corresponding run totals in thousands (e.g., “12.34K”). It uses the `d3.pie` and `d3.arc` functions to compute the arcs and their labels, while `d3.scaleOrdinal` assigns colors from a predefined array. Data is fetched asynchronously from a CSV file using D3’s `d3.csv` loader.

AI-generated description

Mike Bostock's D3 Zoomable Sunburst example

<br></br> Ported from this Observable notebook for this forum thread. Many thanks to Bryan Gingechen who answered my question about the necessary steps to get from an (Observable) JavaScript notebook to a vanilla JavaScript index.html. He presented his solution on blockbuilder.org

MIT Licensed

Similar vizzes