🌍 Public
Question-1.2
This horizontal bar chart displays the population of 20 countries in 2010, with bars extending rightward from a shared left origin to represent each nation’s total population. Built with React and D3 v5, the visualization uses `scaleBand` for the categorical country axis and `scaleLinear` for the population scale. Rectangular marks are rendered as SVG elements, and the D3 `format` function abbreviates axis tick labels (e.g., converting millions to “B”). Data is loaded asynchronously via `d3.csv` 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
Comments
Sign in to join the discussion.