Activity 7-1
✓ Published0🌍 Public
A horizontal bar chart displays the population of 19 countries in 2015, sorted alphabetically by country name. The bars are filled with light green rectangles, with blue tick marks and gray text labels for the axes. Built with React and D3 v5, the visualization uses `d3.scaleBand` for the categorical y-axis, `d3.scaleLinear` for the numeric x-axis, and `d3.csv` to fetch the data from a GitHub raw CSV file. Hovering over a bar reveals a tooltip with the population value formatted using `d3.format`. The SVG output is rendered directly within a React component.
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