Question1.2
✓ Published0🌍 Public
This example displays a horizontal bar chart of the top 20 countries by population in 2010, with bars sorted by country name. Built with React and D3.v5, it uses `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The SVG rendering includes axes and marks, with population values formatted using `format('.2s')` to replace 'G' with 'B'. Data is loaded via D3's `csv` function from a GitHub-hosted CSV file, and all chart elements—ticks, labels, and rectangles—are generated from local ES6 modules.
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