🌍 Public
Viewing a saved revision (read-only)
5ef1fb3eabd54d038b34cc7f9bf4fb0b
Activity 6.12
This bar chart displays the population of 20 countries in 2010, ordered along a vertical axis with horizontal bars extending from a shared baseline. The visualization uses React to render SVG elements, with D3's `scaleBand` and `scaleLinear` mapping country names and population values to pixel coordinates. Axes are drawn using custom `AxisBottom` and `AxisLeft` components, while the `Marks` component generates rectangles with native SVG tooltips. Data is loaded asynchronously from a CSV file via `d3.csv`, with population values converted from thousands using D3's `format` helper.
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.