Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
PPedro Ernesto Tramontina
Last edited Mar 25, 2020
Created on Mar 24, 2020
Forked from Testing

This example shows a horizontal bar chart of population by country, using a CSV dataset ordered from China to Mexico. D3 v5 functions `csv`, `scaleLinear`, and `scaleBand` map population values to bar widths and country names to row heights, while `axisLeft` and `axisBottom` render the axes. The SVG renders steel-blue rectangles with D3’s `selectAll` and data joins, with a fixed 960×500 viewport and margins defining the inner plot area.

AI-generated description
MIT Licensed

Similar vizzes