Skip to main content
100%

Fork of Fork of Fork of ICE7 Pie Chart

✓ Published0🌍 Public
Ppravallikayaram12
Last edited Mar 28, 2022
Created on Mar 28, 2022

This example shows a pie chart of the top ten cricketers’ career runs, with each slice sized proportionally to a player’s total. A legend lists each player name alongside its value. The code loads data from a JSON file, uses d3.pie to compute angles and d3.arc to generate SVG path segments, while d3.scaleOrdinal with d3.schemeCategory10 assigns slice colors. Legends are manually appended as SVG rectangles and text elements, with run values formatted using d3.format.

AI-generated description
MIT Licensed

Similar vizzes