Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
BBrad Johnson
Last edited Jan 17, 2020
Created on Jan 17, 2020
Forked from Hello

This example shows the population of ten countries as horizontal bars, with bar length representing population and each bar labeled by country name. It uses d3.scaleLinear for the x-axis and d3.scaleBand for the y-axis, loading data from an external CSV file with d3.csv. The SVG rectangles are appended and sized directly through D3’s data join, with population values converted from thousands to raw counts before rendering.

AI-generated description
MIT Licensed

Similar vizzes