Skip to main content
100%

Assignment 6: Bar Chart with Color Legend

✓ Published3🌍 Public
Hhxu51@usfca.edu
Last edited Mar 3, 2025
Created on Mar 3, 2025

This example presents a bar chart of carrier delays by airport, with bars colored on a sequential blue scale and a corresponding color legend. The chart loads data from a remote CSV file using `d3.csv`, scales the x-axis with `d3.scaleBand` and the y-axis with `d3.scaleLinear`, and renders rectangles in SVG. The color encoding uses `d3.scaleSequential` with `d3.interpolateBlues`, while the legend is generated via the `d3-legend` plugin’s `d3.legendColor`.

AI-generated description
MIT Licensed

Similar vizzes