🌍 Public
Viewing a saved revision (read-only)
788577b11875432fbac8f612712e7b3b
ACTIVITY6 QUES 1 (PART2)
This example displays a horizontal bar chart of 2010 population data for 20 countries, rendered as an SVG using React components. It uses D3 v5 modules including `scaleBand`, `scaleLinear`, `max`, and `format` to process the CSV data loaded from a remote GitHub URL via `csv`. The chart includes custom `AxisBottom` and `AxisLeft` components, with blue tick lines and green bars. Population values are formatted using `format('.2s')` and converted from gigabytes to billions for the x-axis labels.
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.