Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a Bar Chart!

Public visualization

Viewing a saved revision (read-only)

30a09e5e50cb48dc881bc00d4a9e548a

Let's make a Bar Chart!

0 stars1🌍 Public
Eezzep66
Last edited Nov 5, 2019
Created on Nov 4, 2019

This horizontal bar chart displays the populations of ten countries, scaled by thousands, with a tooltip revealing precise values on hover. The visualization uses D3 v5's `scaleLinear` for the x-axis and `scaleBand` for the categorical y-axis, rendering via SVG. Population data originates from the UN World Population Prospects, loaded from a CSV file using `csv`. A custom tooltip div appears on mouseover, positioned at the cursor using `event.pageX` and `pageY`. The chart’s axes are generated with `axisBottom` and `axisLeft`, and bars are drawn as SVG `rect` elements.

AI-generated description