Fork of Reusable D3 Scatter Plot
✓ Published0🌍 Public
This pie chart shows the frequency distribution of the top 10 most common math scores from a student dataset, with each slice representing a score and its count. The visualization uses D3.js v7 to load CSV data, calculate score frequencies, and sort them to select the highest counts. D3’s `pie` and `arc` generators create the SVG paths, while a custom color palette (filtered from `d3.schemeCategory10`) fills each slice. A separate SVG legend, built with `d3.select` and data joins, maps colors to score values and counts, with the chart and legend displayed side by side in a flex container.
AI-generated descriptionMIT Licensed