Activity-6-Q1.1
✓ Published1🌍 Public
This chart, built with React and D3, presents a horizontal bar chart of population figures for the year 2000, showing only the first ten countries from a remote CSV dataset. The visualization uses D3’s `scaleBand` for the categorical country axis and `scaleLinear` for the continuous population axis, rendering bars as SVG rectangles. The code demonstrates importing from the D3 library and local ES6 modules, with axes and marks as separate components. The chart includes a tooltip on each bar and custom axis formatting, converting values like “1.2B” from the D3 `format` function.
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