Skip to main content
100%

Diagrame en barres D3

✓ Published0🌍 Public
Cclebas
Last edited Apr 6, 2021
Created on Apr 6, 2021

This example displays a horizontal bar chart of the ten most populous countries in 2020, using data from a UN population CSV loaded via `d3.csv`. The visualization is built with React and D3 v5, where `scaleBand` positions each country along the y-axis and `scaleLinear` maps population values to bar widths. Rendered as SVG rectangles, the chart updates asynchronously after the data fetch, with a loading message shown initially. The code explicitly imports utilities like `max` and `scaleBand` from the D3 library.

AI-generated description

React en couleurs.

MIT Licensed

Similar vizzes