Skip to main content
100%

Bar chart with a Sequential color scale

✓ Published10🌍 Public
Pprateekvasi
Last edited May 5, 2022
Created on Mar 3, 2022
Forked from Stripe Chart

This bar chart displays average engine horsepower for seven car manufacturers, sorted from lowest to highest, with bars colored according to a sequential red color scale that maps horsepower values to increasingly darker shades. A yellow tooltip appears on mouseover, showing the exact manufacturer and horsepower value. The visualization is built with D3 v6, using `scaleBand`, `scaleLinear`, and `scaleQuantize` for positioning and color encoding, along with the ColorBrewer Reds palette and the d3-legend library. Data is loaded from a CSV file via `d3.csv`, and rendered as SVG rectangles with interactive hover effects.

AI-generated description
MIT Licensed

Similar vizzes