🌍 Public
Viewing a saved revision (read-only)
516e651509344cf19d385c5ef325cedc
Activity6q1
This horizontal bar chart displays the populations of 20 countries in 2010, sorted alphabetically by country name. The chart uses React and D3 v5, with scaleBand for the categorical y-axis and scaleLinear for the quantitative x-axis. Population values are formatted using D3's `format` function, converting values like "G" (giga) to "B" (billion). The data is loaded asynchronously from a CSV file via d3.csv, and bars are rendered as SVG rectangles with native tooltips.
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.