Task_1_Question_1
✓ Published0🌍 Public
This visualization displays the populations of the ten most populous countries in the year 2000 as a horizontal bar chart. It loads data from a CSV file via a custom `useData` hook, using D3’s `csv` parser to format values. The chart renders with SVG and React, mapping country names to a D3 `scaleBand` on the y-axis and population values to a `scaleLinear` on the x-axis. Axes are drawn by custom components `AxisBottom` and `AxisLeft`, while `Marks` renders each bar as a `rect` with a tooltip. Tick formatting converts large numbers to abbreviated strings like “1.2B” via D3’s `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