🌍 Public
Viewing a saved revision (read-only)
d6de836c22694ecdb28143f51959b7da
Question 1.2
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.