Activity 6 Tutorial 1
✓ Published1🌍 Public
This example displays a horizontal bar chart ranking the populations of 30 countries for 2020. It uses React with D3’s `scaleBand`, `scaleLinear`, `max`, and `format` APIs to build the visualization in SVG. The code loads CSV data via `csv` from a GitHub gist, formats tick labels with `.2s` (converting Gigabytes to Billions), and includes native SVG `<title>` tooltips. Axes are rendered as custom React components, with blue tick lines and green bars.
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