Activity_6_Question_1.2
✓ Published0🌍 Public
This example displays a horizontal bar chart of population figures for 20 countries in 2010, with countries on the y-axis and population on the x-axis. The code uses React with SVG rendering and D3 v5 APIs including `scaleBand`, `scaleLinear`, and `csv` to load and format the data from a GitHub-hosted CSV file. Blue tick marks and green bars are styled via CSS, while native SVG `<title>` elements provide tooltips. The chart includes rotated country-name labels and formatted population ticks using D3’s `format` specifier.
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