Skip to main content
100%

Marcus' bar chart with axis formatting

✓ Published1🌍 Public
Mms-aus
Last edited Aug 31, 2019
Created on Aug 19, 2019

This example shows a horizontal bar chart ranking the world’s 10 most populous cities by metro population, with formatted axis labels and gridlines. Data is loaded from a CSV file via `d3.csv`. The visualization uses `d3.scaleLinear` and `d3.scaleBand` to map values, `d3.axisBottom` with a custom `.tickFormat` to abbreviate numbers (e.g., converting G to B), and `d3.axisLeft`. Bars are rendered as SVG `rect` elements with a pink background and steelblue fill.

AI-generated description

Population of 10 most populous cities

MIT Licensed

Similar vizzes