🌍 Public
Viewing a saved revision (read-only)
33ea2cc8c78e47c5940b1218159a4ffa
Activity6_q1_1
A horizontal bar chart displays population figures for ten countries in the year 2000, sorted by country name on the y-axis. The chart uses D3 v5’s `scaleBand` for the categorical axis and `scaleLinear` for the numeric axis, with React components rendering SVG `<rect>` marks. Data is loaded from a CSV file via `d3.csv` and formatted with `d3.format` to abbreviate large numbers (e.g., “1.2B”). Axis ticks and bar tooltips are built from custom React components, while the styling applies a green fill and blue tick lines.
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.