Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
AAaron Guillen
Last edited May 26, 2020
Created on May 26, 2020

This example shows a horizontal bar chart ranking the ten most populous countries, with bars colored by country and labeled along a bottom axis. The chart uses D3.js scales (`scaleLinear`, `scaleBand`, `scaleOrdinal`) to map population values and country names, while `d3.axisLeft` and `d3.axisBottom` render the axes. Population data is loaded from a CSV file via `d3.csv`, multiplied by 1000 in the code, and rendered as SVG rectangles. The visualization highlights D3’s core data-binding and SVG generation workflow.

AI-generated description
MIT Licensed

Similar vizzes