🌍 Public
Viewing a saved revision (read-only)
e928f567d9d245c984ef1ba8409a442d
Activity 1_task 1
This example displays a horizontal bar chart of population figures for 30 countries in 2020, using D3 scales for positioning and React for rendering. It loads comma-separated data from a GitHub-hosted CSV file, parsing the `2020` column and multiplying by 1000 to represent population. SVG rectangles are generated from the `Marks` component, with axes drawn using `scaleBand` and `scaleLinear` and formatted with D3's `format` function, converting Giga to Billions for labeled ticks.
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.