🌍 Public
Viewing a saved revision (read-only)
41e491301cec492d9f3a8d4cf2d7bf54
Diabetes Self-Management Practices Pie Chart
This pie chart shows the distribution of five diabetes self-management practices—diet, exercise, medication, monitoring, and education—with each slice labeled by its percentage of the total. The visualization uses a donut-style arc layout with hover interactions that display the practice name, raw value, and percentage in a tooltip. It is built with D3’s `pie`, `arc`, and `scaleOrdinal` functions, rendering SVG paths and a legend. The sample data is hardcoded in the script, and the chart adapts its radius to the container’s dimensions.
AI-generated descriptionAn approximation of a line chart using D3.js!
Watch the video and study the code to learn about:
- SVG Path Elements
- fill, stroke, stroke-width
- stroke-linecap, stroke-linejoin
- Vanilla HTML SVG Paths
- D3.line
- AI Assist
See also: