Viewing a saved revision (read-only)
01d6d32f5dc047858743bac0ca400339
Activity6_population
This horizontal bar chart displays the population of ten countries in 2020, sorted by country name on the y-axis and population magnitude on the x-axis using a linear scale. The visualization is built with React and D3 v5, using `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis, rendered as SVG rectangles. Data is loaded from a remote CSV file via D3’s `csv` function, with population values parsed by multiplying the 2000 column by 1000. Axis ticks are formatted using D3’s `format` with a `.2s` suffix, replacing 'G' with 'B' for readability, and tooltips show the exact formatted population on hover.
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.