Activity-6_Question-1.2
✓ Published1🌍 Public
This example displays a horizontal bar chart of population data for 20 countries in 2010, with country names on the y-axis and population values on the x-axis. The visualization is rendered as SVG within a React application, using D3 scaleBand and scaleLinear to map data to positions, and custom React components (AxisBottom, AxisLeft, Marks) to draw axes and bars. Data is loaded asynchronously via the d3.csv function from a GitHub-hosted CSV file, with population values formatted using the d3 format function and converted to billions for tick labels.
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