Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Making a Bar Chart

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed