Activity_6_test_2
✓ Published0🌍 Public
This example displays a horizontal bar chart comparing the 2010 population of 20 countries, using a dataset loaded from a GitHub-hosted CSV file. The chart renders as an SVG via React, with d3.scaleBand mapping countries to the y-axis and d3.scaleLinear mapping population values to bar widths. The code imports d3 utilities like csv, max, and format, and uses reusable React components for axes and marks. A d3.format function converts large tick values into abbreviated units (e.g., 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.
MIT Licensed