Skip to main content
100%

Fork of Reusable Scatter plot Activity 8

✓ Published0🌍 Public
Jjtulasi05@gmail.com
Last edited Nov 6, 2024
Created on Nov 6, 2024

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 description

A demonstration of reusable Pie chart.

MIT Licensed

Similar vizzes