Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 bar chart example

Public visualization

D3 bar chart example

0 stars0🌍 Public
AArturo Zamora
Last edited Nov 11, 2021
Created on Nov 4, 2021

This bar chart displays the populations of the top ten most populous countries using 2018 estimates from the United Nations World Population Prospects. It demonstrates customization of D3 axes, removing their default domains and styling tick text and lines. Built with d3.v5, it uses `d3.csv` to load data, `d3.scaleLinear` and `d3.scaleBand` for scales, and `d3.axisLeft` and `d3.axisBottom` for axes, with a tick format that converts millions (G) to billions (B). Bars are rendered as SVG rectangles.

AI-generated description

Inspired in Bar Chart example by Curran Kelleher that can be checked here.

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.

Comments

Sign in to join the discussion.

MIT Licensed