🌍 Public
Viewing a saved revision (read-only)
82e5f3077102441c9fa633a5aa90d5f4
Activity6_question-1
This example shows a horizontal bar chart ranking the populations of ten countries in the year 2000, with countries listed on the y-axis and population values on the x-axis. The chart uses React to render SVG elements, with D3 v5’s `scaleBand` and `scaleLinear` for positioning, and custom React components for the axes and marks. Data is loaded from a remote CSV file via `d3.csv`. Bars are colored green, and hovering over a bar displays its population value using a native SVG `<title>` tooltip, with tick labels formatted in billions 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.