Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Reusable Scatter plot Activity 8

Public visualization

Viewing a saved revision (read-only)

cf5a0d0d3d5744e894445f9e247fef87

Fork of Reusable Scatter plot Activity 8

0 stars0🌍 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 scatter plot.