Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Assignment 6: Bar Chart with Color Legend

Public visualization

Assignment 6: Bar Chart with Color Legend

0 stars3🌍 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

Comments

Sign in to join the discussion.

MIT Licensed