Activity 6 Question 1.1
✓ Published0🌍 Public
This example renders a horizontal bar chart comparing the population of ten countries for the year 2000. The visualization uses React to construct SVG elements, with D3's `scaleBand` and `scaleLinear` functions mapping categorical country names and continuous population values to the chart's axes. The bars display a tooltip with the formatted population value. The code imports D3 functions like `csv`, `scaleBand`, `scaleLinear`, and `format`, and loads data asynchronously from a GitHub-hosted CSV file.
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