harsha activity6que2
✓ Published0🌍 Public
This visualization displays the populations of 20 countries for the year 2010 using a horizontal bar chart. The chart is built with React and D3 v5, using `scaleBand` for the country categories on the y-axis and `scaleLinear` for the population values on the x-axis. Population data is loaded from a CSV file via D3's `csv` function, with values multiplied by 1000. The SVG rendering includes custom axis components and tooltips that format large numbers using D3's `format` function with SI prefixes.
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