Question 1.2
✓ Published0🌍 Public
This example shows a horizontal bar chart ranking the top 20 countries by their 2010 population, using a logarithmic-free linear scale from zero to the maximum value. The React code with D3 v5 utilities loads population data from a CSV file, maps it with `scaleBand` and `scaleLinear`, and renders the chart as an SVG with blue tick lines, green bars, and tooltips formatted in billions. The axes and marks are built from custom ES6 modules, with the x-axis labels formatted via `format('.2s')` and the y-axis listing country names.
AI-generated descriptionMIT Licensed