Skip to main content
100%

Activity_7

✓ Published0🌍 Public
SSai Sandhya Nannapaneni
Last edited Nov 7, 2024
Created on Nov 7, 2024
Forked from Piechart ICE7

This example visualizes the top five NBA players by salary using a pie chart, with slices labeled by player name and salary. The chart is built with D3 v5, using `d3.pie` to compute arc angles, `d3.arc` to generate SVG paths, and an ordinal color scale (`d3.schemeCategory10`) for slice fills. Data is loaded asynchronously from a CSV file via `d3.csv`, filtered by salary, and sorted descending before the top five are selected. Labels are placed using `arc.centroid`, and a legend maps colors to player names.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes