activity 6_Question 1.1
✓ Published1🌍 Public
This example shows a horizontal bar chart comparing the population of the top 10 countries in 2020. The bars are rendered as SVG rectangles using React, with the length of each bar encoding population magnitude. The code uses d3.scaleBand for the categorical y-axis, d3.scaleLinear for the quantitative x-axis, and d3.format to display tick labels in abbreviated form (e.g., "B" for billions). Data is loaded asynchronously from a CSV file using d3.csv, and tooltips appear via SVG `<title>` elements. The chart includes labeled axes for country names and population values.
AI-generated descriptionMIT Licensed