🌍 Public
Viewing a saved revision (read-only)
2cfaa58c6bc34275b7272a90d0703da5
Activity-6
This chart displays the populations of 20 countries in 2010 as a horizontal bar chart, ordering the bars by country name. It uses d3.scaleBand and d3.scaleLinear to position bars, with React components for axes and marks, rendering to SVG. Data is loaded via d3.csv from a GitHub raw dataset, with population values converted from a string column to numbers. The chart applies d3.format for compact tick labels, replacing 'G' with '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.