🌍 Public
Viewing a saved revision (read-only)
36be717e818346d482853310b76d6459
Axes with React & D3
This example shows a horizontal bar chart of population data for ten countries in 2020, with a formatted x-axis and categorical y-axis labels. The visualization is built with React components that leverage D3 scales (`scaleBand`, `scaleLinear`) to compute positions, while the axes and marks are rendered as SVG elements generated through JSX. Data is loaded via `d3.csv` from a GitHub-hosted dataset, and tick labels use `d3.format` to abbreviate large population numbers. Styling is applied through CSS classes targeting the SVG elements.
AI-generated description