Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Viewing a saved revision (read-only)

a15583d7bf5a45ea9bbc0604563b43b7

Making a bar chart

0 stars0🌍 Public
JJun Alvarado
Last edited Aug 24, 2022
Created on Aug 24, 2022

This bar chart displays the population of ten countries, ordered by descending population size, using a clean SVG rendering. The visualization loads data from a CSV file and maps the values using `d3.scaleLinear` for the y-axis and `d3.scaleBand` for the categorical x-axis. Axis generation relies on `d3.axisLeft` and `d3.axisBottom`, while a D3 selection with `.select` appends rectangle elements to form the bars. The chart is built with d3.v5, driven by a promise-based `d3.csv` call, and styled with minimal CSS.

AI-generated description