Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

react bar chart

Public visualization

Viewing a saved revision (read-only)

618d15e5442f426fa828b042138c0d23

react bar chart

0 stars1🌍 Public
SSuperShreejit
Last edited May 15, 2022
Created on May 15, 2022

This example shows a horizontal bar chart that displays the 2020 population estimates for the top 10 countries, sourced from a UN Population CSV file. The chart uses D3 scales (`scaleBand` and `scaleLinear`) to map country names to vertical positions and population values to bar widths. React components compose the visual elements, rendering an SVG with axes, bars, and tooltips. The X-axis formats tick labels using D3’s `format('.2s')`, converting values like billions, while the Y-axis labels are placed using the band scale’s midpoint.

AI-generated description

A react population barchart WORLD POPULATION