Skip to main content
100%

Making a bar chart

✓ Published0🌍 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
MIT Licensed

Similar vizzes