Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Diabetes Self-Management Practices Pie Chart

Public visualization

Viewing a saved revision (read-only)

41e491301cec492d9f3a8d4cf2d7bf54

Diabetes Self-Management Practices Pie Chart

0 stars2🌍 Public
Oomniaabouhassan@gmail.com
Last edited Sep 26, 2024
Created on Sep 25, 2024

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 description

An 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:

Full Playlist: Constructing Visualizations