Making a bar chart
✓ Published3🌍 Public
This example shows a horizontal bar chart of the 12 most populous countries in 2020, using data from a UN population CSV file. It loads the data with `d3.csv` and renders the bars as SVG rectangles using React. The chart maps country names to the y-axis with `d3.scaleBand` and populations to the x-axis with `d3.scaleLinear`, computing the maximum value with `d3.max` for the domain.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!
MIT Licensed