🌍 Public
Viewing a saved revision (read-only)
14a73f11b3f54d74be10bda3fa167792
A6 - Bar Chart w/ Sequential Color Scale
This example visualizes new AIDS diagnoses in 2020 for six countries, using a horizontal bar chart where bar height encodes the diagnosis count and a sequential red color scale encodes the same quantitative value. The visualization includes an axis, gridlines, and a legend for the color scale. The chart is built with D3 v7, using `d3.scaleBand` for the categorical x-axis, `d3.scaleLinear` for the y-axis, and `d3.scaleSequential` with `d3.interpolateReds` for the color mapping. The legend is generated via the `d3.legendColor` API. Data comes from UNAIDS via CORGIS.
AI-generated descriptionData provided by UNAIDS (United Nations AIDS Council)
(Side scrolling for legend)
References: