Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart.js!

Public visualization

Viewing a saved revision (read-only)

83120dd43cc6462ab8ff30d85ae8ab1f

Bar Chart.js!

0 stars1🌍 Public
PPetter-Smit
Last edited Dec 27, 2022
Created on Dec 26, 2022

A horizontal bar chart displays the top 10 most populous countries from a CSV file using D3 v5. The chart uses `d3.scaleBand` for y-axis categories and `d3.scaleLinear` for population values, with formatted tick labels converting values to billions. Bars are rendered as SVG rectangles in steel blue, with axis labels and a title included. The code loads data via `d3.csv` and applies a custom tick format to abbreviate large numbers.

AI-generated description