Skip to main content
100%

Making a Bar Chart

✓ Published2🌍 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
MIT Licensed

Similar vizzes