Visualising the Data II - Bar Charts
✓ Published1🌍 Public
This example visualizes the top 10 most populous countries from the UN Population 2019 dataset using horizontal bar charts. The bars are rendered as SVG rectangles within a React component, with their widths proportional to each country's 2020 population estimate. The code uses D3's `csv` loader to fetch the data, `scaleBand` for the categorical y-axis, and `scaleLinear` for the numeric x-axis. React manages the loading state, displaying "Loading..." until the data arrives, then renders the chart with D3 scales.
AI-generated descriptionA program that loads in some data using D3 utilities, arc and pie and uses React to render the data as a radial burst. Data source: MDN Named Colors
MIT Licensed