Activity 6_Task 1
✓ Published2🌍 Public
This horizontal bar chart visualizes the 2020 populations of 30 countries. Built with React and rendered as SVG, it uses D3’s `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The `Marks` component draws rectangles whose widths correspond to population values, with tooltips formatted via D3’s `format` function. Axis tick labels are formatted with the `.2s` specifier to show values in billions, and data is loaded from a remote CSV using D3’s `csv` function within a custom `useData` hook.
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