Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

9ec0ded505e4458fa73508b7c1f0a962

Making a Bar Chart

0 stars0🌍 Public
RReshma R
Last edited Mar 27, 2019
Created on Mar 26, 2019

This example displays the population of the ten most populous countries, based on 2018 United Nations estimates from World Population Prospects 2017, as horizontal bars. The chart uses D3 v5 with `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and `d3.axisLeft` and `d3.axisBottom` for tick rendering. Data is loaded from a CSV via `d3.csv`, and each bar’s width is scaled proportionally to population values, multiplied by 1000. The SVG output is styled with steelblue rectangles.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017.