🌍 Public
Viewing a saved revision (read-only)
b174d500df61443c835a535ace1b0d28
activity 6_Task 1
This example shows a horizontal bar chart of the 2020 populations of 30 countries, with bars sorted by country name. The chart is built using React and D3 v5, with SVG rendering. It uses `d3.csv` to load data from a remote CSV file, `d3.scaleBand` and `d3.scaleLinear` for the axes, and a custom `Marks` component to render the bars. The bars display population values, with a tooltip showing the formatted number, and the y-axis labels list country names.
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.