🌍 Public
Viewing a saved revision (read-only)
c6d6f0bf54c14319bdbe8e983e814675
Fork of Activity 6_Task 1_Q1.2
A horizontal bar chart displays the 2010 populations of 20 countries, loaded as CSV data via `d3.csv` in a custom `useData` hook. React components render the SVG, with `scaleBand` and `scaleLinear` mapping countries and population values, while `AxisBottom` and `AxisLeft` create axes. The `Marks` component draws rectangle bars with tooltips, and populations are formatted using `d3.format`.
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.