Skip to main content
100%

Pathetic Bar Chart

✓ Published0🌍 Public
EElliot Hill
Last edited Jul 8, 2021
Created on Jul 8, 2021

This example shows a horizontal bar chart that displays the top ten countries by population for 2020, using a clean SVG rendering. The chart’s bars are plain rectangles, sized by population values scaled linearly along the x-axis, while country names are positioned on a band scale along the y-axis. The data is loaded asynchronously from a remote CSV file using d3.csv and processed with a row function that converts population strings to numbers. The visualization is built with React components, and the scales and data loading rely on d3.scaleBand, d3.scaleLinear, and d3.max from d3 v5.

AI-generated description

Loading data with d3

MIT Licensed

Similar vizzes