Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

91a562880e134374b0079cbec3e2f2ff

Making a Bar Chart

0 stars2🌍 Public
AArthur Welf
Last edited May 20, 2019
Created on Apr 30, 2019

This example shows a bar chart of the top 10 most populous countries, with each bar labeled by its population value in billions. The chart uses d3.csv to load the data, then d3.scaleBand and d3.scaleLinear to position bars and axes. It renders via SVG, with d3.axisBottom and d3.axisLeft for the axes, and includes a horizontal line marking the 1.15 billion population threshold. The code also applies custom tick formatting and removes default axis domains.

AI-generated description