question2_activity_2010
✓ Published0🌍 Public
A horizontal bar chart displays 2010 population figures for twenty countries, sourced from a CSV file. The visualization uses React with D3 v5's `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. SVG rectangles render the bars, with axes generated by custom components and tooltips via SVG `<title>` elements. Population values are formatted using `d3.format` to abbreviate large numbers, such as converting gigabytes to billions.
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.
MIT Licensed