Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar chart with D3.js

Public visualization

Viewing a saved revision (read-only)

9795ba97ebc6484f89f89b4db034a372

Bar chart with D3.js

0 stars1🌍 Public
PPotikorn
Last edited Feb 28, 2020
Created on Feb 14, 2020

A horizontal bar chart displays population estimates for ten countries, using a CSV dataset loaded via D3's `csv` method. The visualization ranks countries from China to Mexico along a linear x-scale, with a band scale positioning each categorical bar. SVG rectangles are appended to a grouped `<g>` element, with axes generated using `axisLeft` and `axisBottom`. D3 v5's `scaleLinear`, `scaleBand`, and `max` utilities handle the data mapping, while margin conventions and transform attributes position the chart within a 960×500 SVG viewport.

AI-generated description