Activity6-Tutorial
✓ Published0🌍 Public
This example shows a horizontal bar chart of 2020 population figures for 30 countries, with bars colored light green and a blue axis. It uses React with D3 v5 scales—`scaleBand` for the categorical country axis and `scaleLinear` for the population axis—to render SVG rectangles via the `Marks` component. Axis labels are generated with custom `AxisBottom` and `AxisLeft` components, and population values are formatted using D3’s `format('.2s')` to display abbreviations like "B" for billions. Data is loaded asynchronously from a CSV file via `d3.csv`.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed