🌍 Public
Viewing a saved revision (read-only)
89f4c98adba8422d8de64fc49f2cd718
activity 6-Q1.2
This horizontal bar chart displays the populations of 20 countries for 2010, sorted by country name along the y-axis with population values on the x-axis. Built with React and D3 v5, it uses `scaleBand` and `scaleLinear` to position the rectangles, while custom `AxisBottom` and `AxisLeft` components render the ticks. The data is loaded from a CSV file via `csv()` and formatted with `format('.2s')` to abbreviate large numbers (e.g., "1.2B"). SVG output is generated through React components, with hover tooltips provided by SVG `<title>` elements.
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.