Skip to main content
100%

lm_piechart_Task9

✓ Published0🌍 Public
LLokesh Madem
Last edited Apr 21, 2024
Created on Apr 21, 2024

A pie chart visualizes profit distribution across regions, with each slice's area proportional to the region's profit value and labeled in a legend alongside the corresponding profit amount. The chart renders as an SVG using D3 v5 APIs, including `d3.pie()` to compute arc angles, `d3.arc()` to generate path segments, and `d3.scaleOrdinal` with `d3.schemeCategory10` for color encoding. Data is loaded asynchronously from a remote JSON file provided via GitHub Gist, with profit values parsed as numbers before rendering. The legend maps each color to a region name and its profit value.

AI-generated description
MIT Licensed

Similar vizzes