Question 1.1
✓ Published0🌍 Public
A horizontal bar chart displays the 2010 populations of twenty countries, loaded from a remote CSV with D3's `csv` function. React renders SVG rects for data marks, with a linear scale mapping population to bar width and a band scale mapping country names to vertical positions. D3's `format` function abbreviates tick labels, replacing 'G' with 'B' for billions in the bottom axis. Mouseover tooltips, created with SVG `<title>` elements, show the formatted population values.
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