🌍 Public
Viewing a saved revision (read-only)
5d35a5f1bf31445fbac3bbc041513d65
activity7, question1
This example shows a pie chart visualizing five categories (A–E) with their corresponding numeric values, alongside a color-coded legend and axis labels. It uses a static sample dataset defined in the code. The visualization is built with D3.js v6, using `d3.pie()` to compute arc angles and `d3.arc()` to generate SVG path data. A `d3.scaleOrdinal` with `d3.schemeCategory10` assigns colors, and the chart renders as SVG elements appended to the body.
AI-generated description