Activity 7 Q1
✓ Published0🌍 Public
This example shows a pie chart that visualizes categorical data loaded from a remote CSV file, with each slice colored using a categorical color scale and a legend pairing colors with category and subcategory labels. The chart is rendered as SVG using D3.js v6, where the `d3.pie()` generator computes slice angles and `d3.arc()` creates the path shapes. Data is fetched via `d3.csv`, and the color mapping uses `d3.scaleOrdinal` with `d3.schemeCategory10`. The code also adds axis labels (X and Y) that are not tied to the pie chart, acting as placeholders within the SVG layout.
AI-generated descriptionMIT Licensed