Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
YYIN Wanxuan
Last edited Feb 8, 2020
Created on Feb 8, 2020
Forked from Making a Bar Chart

This bar chart visualizes the population of the top 10 most populous countries, using a 2018 United Nations estimate. The chart uses `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the population x-axis, with grid lines from `d3.axisBottom` and a customized tick format. Data is loaded from a CSV via `d3.csv`, and the SVG is rendered with `d3.select` and `d3.append`. The example highlights D3.js v5 axis customization and margin-based layout.

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.

MIT Licensed

Similar vizzes