Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of assigment-2 D3

Public visualization

Viewing a saved revision (read-only)

0e2451b0d7394d7fba1cbac86929e60f

Fork of Fork of assigment-2 D3

0 stars1🌍 Public
Pprince.sahith100@gmail.com
Last edited Mar 26, 2025
Created on Mar 26, 2025

This visualization displays the distribution of hypertension risk as a two-category pie chart. It distinguishes between individuals with no hypertension risk (labeled 0, shown in orange) and those with hypertension risk (labeled 1, shown in green), with counts displayed directly on the slices. The chart fetches its data from a CSV file hosted on GitHub using `d3.csv`. The code builds the pie with `d3.pie` and `d3.arc`, applies a categorical color scale via `d3.scaleOrdinal`, and includes a legend rendered next to the chart using HTML.

AI-generated description