tut1
✓ Published0🌍 Public
This example shows a horizontal bar chart of the 2020 population for 30 countries, loaded from a CSV file via `d3.csv`. The chart uses `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the quantitative x-axis, with SVG rectangles for bars. The `d3.format` API formats tick labels, converting billions to a readable "B" suffix. Both axes are rendered in React, with the bottom axis using `xScale.ticks()` and the left axis iterating over the domain. The visualization, built with D3 v5, applies a green fill to bars and blue tick lines, and provides tooltips via `<title>` elements.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed