Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart

Public visualization

Viewing a saved revision (read-only)

1f1e6604919042f8b4c3c4579fbd5bd5

Bar Chart

0 stars1🌍 Public
Iiblub
Last edited Nov 17, 2021
Created on Sep 25, 2021

This bar chart displays the population of ten countries (from the UN Population 2019 dataset) using horizontal bars, with the x-axis representing population and the y-axis listing country names. Built with React and D3 v5, the visualization uses `scaleBand` and `scaleLinear` to map data to the SVG coordinate system. Custom `AxisBottom` and `AxisLeft` components render tick marks and labels, while `Marks` creates rectangular bars with a `<title>` element providing tooltip text. Axis tick values are formatted using D3's `format` function, converting large numbers into readable abbreviations like "1.2B".

AI-generated description

Load data with React