🌍 Public
Viewing a saved revision (read-only)
bd8a9781f5d9415fb261edb3f10346a1
Fork of Reusable Scatter plot Activity 8
This example shows a pie chart of breast cancer diagnosis counts, comparing malignant and benign cases. It loads CSV data via `d3.csv`, aggregates counts with `d3.rollup`, and renders slices using `d3.pie` and `d3.arc` in an SVG. Hovering displays a tooltip with details, while labels and a legend identify each category. The code uses `d3.scaleOrdinal` with `schemeCategory10` for colors and positions text labels at arc centroids via `arc.centroid`.
AI-generated descriptionA demonstration of reusable scatter plot.