Pathetic Bar Chart
✓ Published1🌍 Public
This example demonstrates a basic bar chart that displays the top-ten most populous countries using 2020 population data from a UN dataset. The React application asynchronously loads CSV data via the d3.csv utility and renders the visualization as SVG rectangles. The chart assigns each country’s name to a y-axis position using d3.scaleBand and maps the logged population count to bar widths via d3.scaleLinear. While the visualization loads, the program shows a "Loading..." message, and the bars lack axes, labels, or other annotation.
AI-generated descriptionA program that loads in some data using d3 utilities, and uses React state to keep track of the data.
MIT Licensed