🌍 Public
Viewing a saved revision (read-only)
4b1c28fd73154e9a8a4eaaa97b3b6df9
Assig_2
This example shows a pie chart of diabetes data, displaying the count of each type as labeled segments with a corresponding legend. It visualizes the distribution of diabetes types by count in thousands, with each slice colored distinctly and annotated with its value. Built with D3 v7, it uses `d3.pie` to compute the angles, `d3.arc` to generate the paths and segment centroids, and `d3.scaleOrdinal` for color mapping. The data is fetched as CSV from a GitHub repository and parsed with `d3.csvParse`, while SVG rendering handles the chart and legend.
AI-generated description