Activity 6_Question2
✓ Published1🌍 Public
This bar chart displays the population of the top 20 countries in 2010, ordered along the y-axis with horizontal red bars extending along the x-axis. The visualization loads CSV data from a GitHub repository, slices the first 20 entries, and renders them using React with SVG. It employs D3 v5’s `scaleBand` and `scaleLinear` for axes, and custom components (`AxisBottom`, `AxisLeft`, `Marks`) to generate ticks, labels, and rectangles. A hover tooltip shows the formatted population value via a `<title>` element.
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