A6: Diverging Bar Chart
✓ Published0🌍 Public
This example shows the number of delayed flights for 29 major U.S. airports, sorted from most to least delays, with each bar colored on a diverging purple-orange scale centered on the median value. The visualization uses d3.csv to load the data and d3.scaleBand, d3.scaleLinear, and d3.scaleSequential with the interpolatePuOr interpolator to map delays to bar height and color. Bars are rendered as SVG rect elements, and a color legend is generated via the d3-legend library’s legendColor function, with axes and labels added using d3.axisBottom and d3.axisLeft.
AI-generated descriptionMIT Licensed