🌍 Public
Viewing a saved revision (read-only)
ef002faa2c2044308ef2017b9dba88e4
Activity 6 Task 1
This example shows a horizontal bar chart comparing the populations of 20 countries in 2010, with country names on the y-axis and population values on the x-axis. A population value appears as a tooltip when hovering over a bar. The chart uses React with D3 v5’s `scaleBand`, `scaleLinear`, and `csv` to load and render the data as SVG rectangles. Axes are custom components using D3’s tick formatting with `.2s`, converting values like “B” for billions.
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.