Pie Chart
✓ Published0🌍 Public
This example presents a pie chart depicting the total sales distribution across item categories, sourced from a CSV file. The visualization includes a legend, a title, and a subtitle, with each slice labeled by its category and dollar amount. Built with D3.js v6, the code uses `d3.pie()` and `d3.arc()` to generate the chart, `d3.rollups` to aggregate the data, and `d3.scaleOrdinal` with `d3.schemeCategory10` for coloring. The chart is rendered as SVG elements, with annotations and labels positioned using arc centroids.
AI-generated descriptionPie chart showing sales distribution per every item category.
MIT Licensed