Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question1_Answer1

Public visualization

Viewing a saved revision (read-only)

77f2d18c448e4a40bf8fc063fe4eb9c4

Question1_Answer1

0 stars1🌍 Public
SSeema Shrestha
Last edited Apr 25, 2024
Created on Apr 25, 2024
Forked from Hello VizHub

This pie chart visualizes the distribution of drug types from a CSV dataset of 200 patients, showing the count of prescriptions for each drug. The chart uses D3 v7’s `d3.pie()` and `d3.arc()` to generate SVG arcs, with a categorical color scale (`d3.scaleOrdinal` with `d3.schemeCategory10`) for segment fills. Data is aggregated via `d3.group()`, and each slice includes a white value label. A legend on the right maps colors to drug names, rendered as SVG rectangles and text.

AI-generated description