Skip to main content
100%

Making a Bar Chart

✓ Published3🌍 Public
DDaniel Prevoznik
Last edited May 1, 2020
Created on Apr 30, 2020

This example shows a horizontal bar chart ranking the populations of the ten most populous countries, with country names on the y-axis and population values on the x-axis. It uses D3 v5’s `scaleLinear` and `scaleBand` to map data to pixel positions, `axisLeft` and `axisBottom` for ticks, and SVG `rect` elements filled with steelblue. The data is loaded from a local CSV file via `csv`, with population values multiplied by 1000 to reflect actual counts.

AI-generated description
MIT Licensed

Similar vizzes