🌍 Public
Viewing a saved revision (read-only)
57f8e58cff554da696b21f8f163b255f
Activity 6 Question 1-2
This example displays a horizontal bar chart comparing the 2010 populations of twenty countries, sorted by the country name along the y-axis and population magnitude along the x-axis. Built with React and rendered as an SVG, the chart uses d3's `scaleBand` and `scaleLinear` to position bars and axes, with `d3.format` shortened to billion units for tick labels. Population data is loaded from a CSV file via d3's `csv` function, with each bar’s tooltip showing the formatted value.
AI-generated description