Skip to main content
100%

Stylized Bar Chart

✓ Published0🌍 Public
KKamalabot
Last edited Jul 11, 2022
Created on Jul 11, 2022
Forked from Stylized Bar Chart

This example displays the top 10 most populous countries as horizontal bars, with the x-axis formatted using D3’s `format` to abbreviate large numbers (e.g., “B” for billions). It fetches data from a CSV hosted on GitHub using `d3.csv` and renders SVG elements with React. The chart encodes population via bar width on a `d3.scaleLinear` and country names on a `d3.scaleBand`, with axis components generated from custom React components that leverage D3 ticks.

AI-generated description

A program that shows the top 10 most populous countries as a bar chart.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes