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)

5efe8c9ba5fe4eb09060804d2b13eb0e

Fork of Reusable Scatter plot Activity 8

0 stars0🌍 Public
Bboinapallyhimaja657@gmail.com
Last edited Mar 27, 2025
Created on Mar 27, 2025

This pie chart displays the proportion of smokers versus non-smokers in a dataset loaded from a GitHub gist. The visualization uses D3.js v6's `d3.pie` and `d3.arc` to generate SVG paths, with `d3.scaleOrdinal` assigning blue and red fills for the two categories. Each slice is labeled directly with its category name and count using the arc centroid. A separate HTML legend, built with D3 selections, repeats the color-keyed counts beside the chart, all rendered on a styled sky-blue background.

AI-generated description