Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

43fae43a84eb407cbe61b0bd444bda46

Making a Bar Chart

0 stars0🌍 Public
Ppizzaonline
Last edited Apr 13, 2020
Created on Apr 13, 2020
Forked from Making a Bar Chart

This example displays the top 10 most populous countries using horizontal bars, with population values from the United Nations’ 2018 estimates. The custom D3 axes include a reformatted x-axis that abbreviates numbers like “1.4B” and grid lines. The chart loads data from a CSV file, scales it with d3.scaleLinear and d3.scaleBand, and renders SVG rectangles. Stylized with custom margins and axis labels, it uses d3.csv and d3.axisBottom/axisLeft for layout and tick generation.

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. It also demonstrates customization of D3 axes.