Skip to main content
100%

let's make a bar chart

✓ Published0🌍 Public
KKRITIKA RAI DWIVEDI
Last edited Jun 25, 2021
Created on Jun 25, 2021

This example displays the top 10 most populous countries as horizontal bars, with country names on the y-axis and population values on the x-axis, rendered as SVG rectangles. The chart uses React for the component structure and d3.v5’s `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis, with the data sourced from the United Nations World Population Prospects 2019 CSV. Axis components (`AxisBottom`, `AxisLeft`) and a `Marks` component draw the ticks, labels, and bars, while the `useData` hook asynchronously loads and slices the dataset.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes