Skip to main content
100%

A6 - Bar Chart w/ Sequential Color Scale

✓ Published1🌍 Public
AAndrew Blakeslee Moore
Last edited Mar 5, 2024
Created on Mar 5, 2024
Forked from HTML Starter

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 description

Full dataset from CORGIS

Data provided by UNAIDS (United Nations AIDS Council)

(Side scrolling for legend)

References:

MIT Licensed

Similar vizzes